Rich Americans have long trusted that a good lawyer — a consigliere figure like The Godfather's Tom Hagen or a courtroom genius like OJ Simpson's attorney Johnnie Cochran — can make their problems disappear.
Even when everyone else abandons you, your lawyer will stay loyal — as long as you can pay them, and not endanger their future career prospects. For Mr Giuliani, whose best career prospect is probably an online crowdfunder, only one of those criteria is relevant.
Lauded for his leadership of New York after the 9/11 terror attacks, he has gone from America's mayor to America's nightmare. His defences of Mr Trump have provided some of the most embarrassing moments of his career, which means something when that career includes being accused of fumbling with his crotch in a Borat movie (he says he was adjusting his shirt).
This week Mr Giuliani attacked attorney-general Bill Barr for stating the obvious truth that there's no evidence of significant fraud in November's election. Reports say that he has privately asked Mr Trump for a pre-emptive pardon for himself. Message to Rudy: you're meant to get your client off, not vice versa. (Mr Giuliani denies asking for a pardon, which, given his history of truthfulness, might suggest the opposite.)
For a normal lawyer, a client who is probably guilty or wrong is an intellectual challenge. But a client who is definitely guilty or wrong is an ethical challenge. You cannot stand up in court and say your client is innocent, if you know they are guilty. You can only obfuscate, arguing that the other side hasn't met the standard of proof required.
Even Mr Giuliani has had to change his tune inside the courtroom: falsely telling the media that you have evidence of electoral fraud might cost you your credibility; falsely telling a judge could cost you your licence.
Yet there are grey areas. As a lawyer, you cannot break the law for your client, or advise your client to do likewise. But you can interpret the law in a way that protects them. Richard Nixon's counsel, Fred Buzhardt, advised him to destroy Oval Office recordings. Even Nixon thought that was unwise. "I'm not sure what I believe beyond the innocence of the president," Buzhardt said in 1973. He died just four years after Nixon resigned.
Some lawyers become even closer to their clients. WikiLeaks founder Julian Assange had two children with one who helped him fight extradition. I guess she handled his briefs in more ways than one.
Overall, lawyers can only help you so much. If your lawyer is the only person left defending you, you're in a bad place. In the drama series The Undoing, Hugh Grant plays a doctor accused of murder (spoilers coming). He is abandoned by his colleagues, his father-in-law, his wife and his son. Only his (excellent) attorney remains.
As his defence collapses and he blames her, she turns on him: "You didn't get rid of [the murder weapon]. How stupid can you get?" Ah, she knew all along he was guilty. She's not angry he's a murderer; she's angry she's going to lose the case. That's the kind of lawyer you want — one with professional dignity. Mr Trump doesn't even have that.
- Financial Times