Majority parties in state legislatures often draw up electoral districts in ways that give themselves an advantage. But how can you tell when they’ve taken partisanship a step too far?

Until now, a majority of the Supreme Court hasn’t been satisfied that there’s a way to measure that, so the court has never struck down a districting plan for being excessively partisan.

But lawyers challenging Wisconsin’s Republican-drawn districts think they have found a way to win over the court’s pivotal justice, Anthony Kennedy. The lawyers argue there are ways of showing when a map is drawn for the purpose of discriminating against a party, is likely to yield the desired results for a decade and has no plausible explanation other than partisan advantage.

One measure calculates “wasted” votes. A wasted vote is any vote that goes to a losing candidate or any vote in excess of what it takes to form a majority. So a district in which a winning candidate gets 55 percent of the vote results in fewer wasted votes than one in which the winner receives 80 percent.

The legal team representing Wisconsin’s Democratic voters says that because of the redistricting, their party had many more wasted votes than the Republicans did.

By the other measure, an unfair edge exists when the same statewide share of the vote for either party results in dramatically different outcomes in legislative districts. In 2012, Democrats won 51.4 percent of the vote and 39 Assembly seats. Two years later, Republicans won 52 percent of the vote and 63 seats.

Those arguments persuaded a three-judge lower court to side with Democrats. The court said the map could only be explained as an effort to maximize the Republican advantage.