Bipartisanship is the broccoli of politics.

Everyone knows it’s good for us, but few of us love it.

When I was elected to Congress in 2010 I became a member of the new House majority, facing a Democratic majority in the Senate and the Obama administration in the executive branch. The only way to pass legislation was through bipartisanship.

In the summer of 2011, Republicans who had been elected in the tea party wave were sorely challenged when it became necessary to raise the ceiling on the national debt. The very idea of countenancing, let alone authorizing, an even more massive burden on American taxpayers, and on successive generations without a vote to weigh in on this depredation against them, was repugnant.

Many of us, including me, had inveighed vehemently in the public record against raising the debt ceiling, and even vowed (ignorance is bliss!) to vote against so doing. But the heady days of campaigning against the leftward juggernaut of the first two Obama years were long over, and, as the grayer (no wonder!) heads advised us, we were now obligated to govern.

The relatively small number of House Republicans who represented swing districts were in the best political position, given the composition of our constituencies, to work across the aisle. Mine was one of those districts.

With superb assistance by my legislative team, I hosted a briefing for fellow members to lay out the potentially devastating consequences of even a technical default. We became acquainted with the tough reality that ending the spiral of profligate spending and confiscatory taxation would require finesse and patience — and bipartisanship.

Enough of us came around to pass the package negotiated by teams from the House and Senate majorities and the White House, but not before a contingent of Republicans most adamantine about their tea party pledges sent everyone back to the drawing board and engendered a last-minute cliffhanger vote that gave us the “sequester” of domestic (a GOP condition) and military (a Democratic condition) expenditures that has vexed both sides ever since.

That, of course, is the essence of compromise, in the immortal words of then-Senate Majority Leader Harry Reid: “No one got what they wanted, and I always find … if people walk out of the room and parties are all dissatisfied, that’s a pretty good settlement.”

In my own frequent, and not infrequently heated, discussions of the debt-ceiling deal, I urged the word “cooperation” be used as an alternative to “compromise,” because in the latter case everyone loses, but in the former everyone wins.

The vogue for positive thinking about bipartisanship that I hoped this reasoning might inspire failed, sadly, to materialize. It’s the gastronomy of politics: If you go into an election envisioning cake and ice cream, getting broccoli instead feels like a letdown.

Today the palatability of bipartisan compromise — cooperation! — is being contemplated afresh, this time by Democrats on whose side the ascendant energy is for radical transformation of our election system, our economy, our energy portfolio and our courts.

And, as in the 2011 debt-ceiling crisis, it falls on those members of Congress and senators whose districts and states are most politically balanced to lead the way forward, with smaller and more gradual steps than their respective parties aspire to take.

While it’s true that bipartisan politicians tend to have a particular type of resilience, namely a tolerance for “friendly” (or less so) fire from their own side, their existence and survival depend almost entirely on who’s electing them. West Virginia Sen. Joe Manchin, the Democrat who has become the de facto leader of the bipartisan coalition on Capitol Hill, represents one of the most Republican states in the country, and that, more than anything else, is what stiffens his spine against his party’s leftward lean.

The relevance of the political composition of constituencies acquires extra prominence every 10 years, when congressional district lines are redrawn according to census results. A combination of advancing polarization and gerrymandering, an impulse to which both sides of the political spectrum have understandably yielded, has decimated the bipartisan species over the past couple of decades — though efforts to curb gerrymandering via “nonpartisan” (this, as does beauty, obtains in the eye of the beholder) vehicles in various states may temper this decline.

We’re in the midst of a redistricting cycle now, and its implications for Washington’s behavior will be known in 2022.

In the meantime, a nation whose dessert preference is evenly divided would be well-advised to develop an appreciation for the healthy benefits of broccoli.