it would be relatively trivial to simulate a null distribution -- generate 10^n quasi-random maps which then give you the null distribution of voters across districts. Compare that null distribution with an actual map and if it sits beyond the x-th percentile you can call it 'gerrymandered'.