The new Epix comedy “Graves” could easily be seen as a hastily assembled effort to draft off the heat of this year’s wildly unpredictable presidential race.

But in fact, the Lionsgate TV comedy starring Nick Nolte as a former president on a quest to fix all that went wrong during his administration was greenlit well before anyone knew who the 2016 contenders for the White House would be — and how much of a slugfest the campaign would become.

“This is a case of life imitating art rather than art imitating life,” Epix president Mark Greenberg said Wednesday night as the pay cabler toasted the series with a premiere screening in New York at the Museum of Modern Art and an after-party at Monkey Bar. “Graves” is one-half of Epix’s push into original series. It’s set to bow Oct. 16 in tandem with the espionage drama “Berlin Station.”

Twenty years after leaving the White House, Nolte’s Richard Graves seeks to revisit decisions on immigration policy and his wife, played by Sela Ward, has political ambition of her own. Some things in the original scripts by creator Joshua Michael Stern were taken out because they seemed too “unbelievable” at the time, including the notion of building a wall along the Mexican border, Greenberg says.

Despite the parallels, “Graves” is not meant to poke fun at Clinton or Trump but at the state of the political process in general. “This show takes on serious issues yet in a very funny and engaging way,” Greenberg said. He emphasized the importance of landing Nolte and Ward for the key roles: “We got more than a little fortunate with this cast.”

Stern advised partygoers that the “Graves” Don Quixote quest gets even weirder as the 10 episodes unfold. He has high hopes that the show will be re-elected for a second season.

Among those who turned out for the premiere and after-party were Bobby Flay, Lionsgate’s Sandra Stern and Chris Selak and actress Brenda Vaccaro.

(Pictured: Epix’s Mark Greenburg, “Graves” stars Nick Nolte and Sela Ward and creator Joshua Michael Stern)