William Baldwin, meet Elliott Spitzer

Did the producers of ABC’s Dirty Sexy Money have a crystal ball?

They cast William Baldwin in the character of Patrick Darling, attorney general for the State of New York, who has a secret, transgendered, girlfriend who could cause him all sorts of trouble if the public finds out.

Ashley Dupre, Elliott Spitzer’s hired gal pal. You’d rather look at Billy Baldwin?

A few months later, the real former New York A.G., and then governor, Elliott Spitzer saw his political career dissolve when his penchant for prostitutes became public.

“I got a phone call from Andrew Cuomo the other day,” Baldwin said on Friday. “He left me a voicemail talking about how life imitates art. …

I was shocked when that all went down … ,” Baldwin wisecracked, “because every time I’ve been with a hooker, there’s never been been any electronic trail whatsoever.

“I mean if I’m not that stupid, how could he be that stupid? The guy graduated from frickin’ Harvard.”