On the second day of its 2017-18 term the U.S. Supreme Court heard a case likely to determine the balance of power between Republicans and Democrats for decades to come. The Court is considering the issue of partisan gerrymandering — the process of drawing legislative district lines to entrench one party’s political power.

When lawmakers engage in partisan gerrymandering they essentially pick who representatives will be before anyone ever sets foot in a ballot box. This is deeply and imminently important because, in the endless election cycles that dominate American politics, the 2018 midterms are just around the corner. Democrats are emphasizing the need to “win back the House.” Republicans highlight the importance of keeping their majority in Congress.

Despite a bruising 2016 campaign and a deficit of 24 House seats, political markers are giving the Democrats hope. The president’s party usually loses seats in midterms. This is particularly true when it controls both the Senate and the House of Representatives. In addition, President Donald Trump’s approval ratings are, to use a technical word, tanking.

But progressives shouldn’t pop champagne corks just yet. Democrats may not be able to translate their strong support into political victory — and the reason has almost nothing to do with their platform or voters, but has everything to do with the issue of partisan gerrymandering.

Let’s say that in State X, for example, 60 percent of registered voters are Democrats, 10 percent are independents, and 30 percent are Republicans. Not all registered voters turn out, but the current climate indicates that Democrats are more likely to go to the polls this midterm cycle, and independents are likely to lean toward Democratic candidates.

Given these variables, one might predict Democrats will win more than half of the state legislative races. But, if Republicans were in power after the last census, when the district lines were drawn, it is the GOP that will likely be the big winners on November 7.

How? Because when lawmakers draw district lines they tend to want to keep their jobs and help fellow party members keep theirs. They do this by “packing” and “cracking” voters when drawing district lines.

When lawmakers pack voters, it means that they put many of one type of voter in a few districts. Democrats, for example, could win by huge margins in a few districts, but never obtain enough votes to win the majority of districts.