On behalf of President Donald Trump, Rudy Giuliani gets a lot of TV time.

He's shouted on-air at a critic: "Shut up, moron!"

He's contradicted himself within seconds about whether he asked the Ukrainian government to probe Joe Biden.

He's read from sheets of paper he called "affidavits" about "bribes." The materials turned out to be printouts of right-wing polemics.

When you step back from all the day-to-day ravings, it is hard to imagine another president tolerating let alone promoting this kind of exhibition.

Pundits have always underrated Giuliani's ability to apple-polish for his patrons and clients.

He used to call Sen. John McCain "an American hero" and "a man of honor and integrity." Saying so now is politically incorrect in Trump circles. And Giuliani hasn't the gumption to defend the late McCain against Trump's posthumous degradations.

Sign up for The Classroom newsletter. Education on Long Island is changing. Find out how. By clicking Sign up, you agree to our privacy policy.

But Giuliani is more than Trump's designated heckler. He's considered Trump's personal lawyer — just as Michael Cohen was before becoming a federal inmate.

Giuliani, who says he is working for free for Trump, has embraced the gig.

Despite this private status, the ex-mayor also has asserted he conducted official business in Ukraine on behalf of the State Department. During the last presidential transition, Giuliani openly campaigned to become secretary of state, but Trump snubbed him even after his first top diplomat, Rex Tillerson, grew alienated.

Maybe Giuliani found a back door into the State Department role he coveted.

Giuliani pushed arms-seeking Ukrainian officials to point prosecutors toward Joe Biden, an American political rival of Trump's.

Giuliani also did some globe-trotting to Turkey on an interesting mission.

Two years ago, he and a longtime friend, lawyer Michael Mukasey, visited Turkish President Recep Tayyip Erdogan on behalf of Reza Zarrab, a gold trader charged with violating sanctions against Iran whom Erdogan wanted freed.

Mukasey in court papers called the meeting part of an effort to seek “a state-to-state resolution of this case,” saying “senior officials in both the U.S. government and the Turkish government remain receptive to pursuing the possibility of an agreement.”

That's not your typical handling of a criminal case. Giuliani's representation of private clients from the former Soviet Union also blends — or clashes, depending on your point of view — with his recent shadow-diplomat role for Trump in Eastern Europe.

U.S. Ukraine Ambassador Marie Yovanovitch was dismissed after Giuliani and other Trump allies complained she was blocking a Biden probe, The Wall Street Journal reported. In fact, she'd criticized then-Ukraine prosecutor general Yuriy Lutsenko for his handling of corruption.

As part of their Trump impeachment inquiry, House Democrats are seeking information from Lev Parnas and Igor Fruman, Ukrainian-American business associates of Giuliani's and also big GOP donors.

Giuliani's advocacy for Trump and his private clients has remarkable overlap.

Last December, Giuliani met for 45 minutes with then-leading Ukrainian presidential candidate Yulia Tymoshenko, according to CNN. "She probably wanted me to tell the President that she was the best one to win," Giuliani told the network.

Back in May, Giuliani attacked businessman Igor Kolomoisky, a fierce critic of the Kremlin, which nationalized his assets after the 2014 annexation of Crimea, according to the McClatchy DC Bureau.

“The notorious oligarch returned from a long exile and immediately threatened and defamed two Americans, Lev Parnas and Igor Fruman,” Giuliani tweeted. “They are my clients and I have advised them to press charges.” He demanded that Ukrainian authorities pursue Kolomoisky.

The core of the question is whom Giuliani is serving overseas and whether it has anything at all to do with what is best for America.