The election is seven weeks away and the outcome, obviously, is far from certain. But a Republican takeover of the House seems more likely than not. And people are already starting to speculate about what it means for Speaker Nancy Pelosi.

Politico's lead story yesterday was "Dems Plan for a Future Without Pelosi." It quoted several sources suggesting that Pelosi was likely to step down, among them an anonymous House member who said "If we lose it badly, Pelosi would have to leave." The source didn't define "lose it badly," but I've heard political professionals on and around the Hill say similar things. As the argument goes, if Democrats lose the House then it means Pelosi has failed. She'll have to go.

I understand the logic. I also don't agree with it.

The Speaker's first job is not to make sure her party holds onto its majority. It's to make the country a better place. And while Pelosi presumably believes (as I generally do) that the country is better off when Democrats are in charge, she also believes that the party should enact a particular governing agenda. And by any reasonable reckoning, House Democrats under her leadership have done precisely that.

With apologies for repeating something I've said many times in this space, Democrats have compiled an incredible record of legislative accomplishment over the last two years. Financial reform. Health care reform. The Recovery Act. Direct student lending. And those are just the most well-known items.

You don't have to think these pieces of legislation are perfect, or even near perfect, to believe that's a large and, in modern times, unprecedented body of work. And it wouldn't have happened without Pelosi, as any close observer of her heroics in the health care debate will attest.

It's true that Pelosi has become a lightning rod for the right. It's also true that she's been pretty much the opposite of the extreme, uncompromising leftist even some of her more moderate critics feared. (Again, ask anybody who watched her cut deals with her longtime foes on abortion rights in order to pass health care reform.) And while all of the legislating undoubtedly exposed members to political attacks, I remain convinced that the primary reason for Democratic political struggles is the bad economy.

But whatever the real political consequences of Pelosi's leadership, those consequences need to be considered in the proper context. The Democratic Party promised to enact an agenda and, thanks in good part to Pelosi's leadership, it did just that. As Ezra Klein wrote a few weeks ago, the party's leaders "got everything they could out of the Democratic supermajority"--even if that meant losing some seats.

To be clear, it's too early to write obituaries for the House Democratic majority or for Pelosi's political career. But it's not too early to render a verdict on her leadership over the last two years. It was very clearly a success.