def count_inversion(sequence): return sum(sum(m