Earlier this month, the US Senate confirmed Kyle McCarter as Donald Trump's ambassador to Kenya. McCarter takes office at a time when the US is facing a slew of third-world problems - from entrenched corruption to a seemingly unaccountable executive to questionable elections. For once, rather than expecting the usual lectures on democracy and good governance, Kenya will be in the position of handing them down.

For many Africans of my generation, brought up on a steady diet of American movies, sit-coms and news media, the US came to represent a paragon of sorts: the world's premier example of democracy and constitutional governance.

In the 1990s, as Kenya struggled to rid itself of the dictatorship of Daniel arap Moi, the US, despite its many flaws, was seen as an important ally of the reform movement. Many still recall the late Smith Hempstone, the US ambassador from 1989 to 1993, a constant and virulent critic of the Moi regime and supporter of local pro-democracy activists.

In more recent times, following the catastrophic failure of attempts to impose democracy by force of arms in Iraq and Afghanistan, the US has seemed much less eager to police democracy in Africa. The six-year tenure of McCarter's predecessor, Bob Godec, was largely marked by silence.

To be fair, he had been somewhat hamstrung from the beginning by the Obama administration's failure to make good on its threat of ostracism should Kenyans vote into office a president and deputy president indicted for crimes against humanity at the International Criminal Court.

Within a year of Uhuru Kenyatta's election, his case having collapsed due to a combination of prosecutorial incompetence, witness intimidation and murder, as well as the Kenya government's intransigence, he was being wined and dined at the White House. From that inauspicious start, it was all downhill for Godec.

His silence over two bungled elections and state repression meant he left office - in the words of one presidential candidate - as "the first American ambassador in recent times to leave Nairobi with negligible or no democratic credentials".

The Trump presidency has done much to undermine US democratic credibility. The US is, today, facing many of the same problems it used to claim to want to help Kenyans solve - from the fraudulent electoral practices that characterised last year's midterm elections to the corruption that seems endemic to the Trump administration and that has turned the US into a laughing stock.

And little illustrates the fall of the United States as a defender of democratic norms quite as well as the Trump administration's lukewarm reaction to the horrific murder of the Saudi Arabian dissident and Washington Post columnist Jamal Khashoggi inside the Saudi consulate in Istanbul. The lengths that the administration went to try to deflect blame from Saudi strongman, Mohammed bin Salman (MBS) were hard to miss, with Trump reduced to casting aspersions on his own intelligence agencies which had concluded that the killing had been ordered by MBS himself. Autocrats around the world will have taken much comfort in this.

So, Kenyans are unlikely to be at the receiving end of any long-winded, self-righteous lectures from McCarter. However, perhaps they may be permitted to offer a few lessons from their own experience: those in the US who think that Trump is the problem and who pine for the good old Obama days, or wish Hilary Clinton had won, are completely missing the point.

US democracy was broken way before Trump got into office and, in a sense, it was inevitable that someone like him would eventually rise up to challenge it. As Trevor Noah, host of the satirical news programme, The Daily Show, says, Trump is "the blacklight on American democracy", showing up all its flaws.

The true test of a democratic system is not its ability to hold elections. Kenya has held elections every five years since independence but still struggles to earn its stripes as a true democracy, one that reflects the wishes and aspirations of its people rather than one that exploits them for the benefit of a small elite.

The test of a democratic system of governance and accountability rather lies in its ability to contain a tyrant bent on undermining it. Trump is the test of American democracy and so far, it is a test the US is failing.

"The blunt fact is that many of the guardrails that were supposed to protect the world's oldest functioning democracy have been shown to be perilously weak, as vulnerable to assault as the Maginot Line was in the face of the German army some 75 years ago," American commentator Jeff Greenfield wrote in the wake of Trump's election.

Further, as Professors James Goldgeier and Elizabeth Saunders note, "constraints on the president - not just from Congress but also from the bureaucracy, allies, and international institutions - have been eroding for decades."

Thus, as President Trump defies nearly every norm that had for decades created at least a semblance of accountability - from releasing tax records to creating blind trusts - and as he continues to wreak havoc, the institutions of American democracy seem powerless to do anything but tut-tut at the most outrageous abuses.

And Trump is hardly taking the road less travelled. As analyst John Feffer points out in his piece for Truthout, "when it comes to wrongdoing, Trump has plenty of presidential precedents, from the high crimes and misdemeanours of Richard Nixon to the torture policies of George W Bush. Trump is as crude as Lyndon Baines Johnson, as ill-prepared as Ronald Reagan, as sexually predatory as Bill Clinton." George Bush and Barack Obama similarly played their part.

Kenyans have much familiarity with such institutional and personal failure in the highest office. McCarter may not be handing out any lessons on his tour of duty, but if he chooses to listen, he could learn a few truths to take back home.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.