In June, the U.S. Supreme Court handed down a decision allowing some disputed districts in Texas to be used in the upcoming congressional midterm elections.

The 5-4 court ruling is seen as a loss for Democrats and civil rights advocates who argue the districts in question are racially gerrymandered.

Tensions over Texas' oddly-drawn districts began to be battled out in court almost immediately after they were drawn in 2011 by the Republican-controlled Texas state legislature.

Unlike the years of litigations and appeals might have one think, figuring out whether a district is gerrymandered is pretty simple.

For example, it's worth looking back at a 2015 study that found "squiggly" districts, or districts with boundaries all over the place, are mathematically more likely to be gerrymandered.

LATEST: Amber Heard, other celebs travel to Texas to protest Trump's family separation

The study, by Silicon Valley Data Science, "found that districts are less compact (more squiggly) when one party controls the redistricting process" and "electorates in less compact districts tend to be overly skewed towards one party, providing some validation that the motivation of drawing these districts is to achieve specific distributions of voters."

In other words, weirdly-shaped districts are a pretty solid indicator for when gerrymandering is afoot. In fact, researchers even assigned a numerical value for the "squiggliness" of the district, showing which of Texas district's are the most or least gerrymandered.

In Texas, the data shows that because of such gerrymandering, Republicans receive two extra seats in the U.S. House of Representatives.

Check out Texas' most gerrymandered congressional districts above.