@@ -0,0 +1,645 @@
+#!/usr/bin/env python%0A# encoding: utf-8%0A%0Afrom __future__ import print_function%0Aimport sys%0A%0AOUTPUT_SUFFIX = %22MOD%22%0A%0A%0Adef clean_input_file(file_path):%0A    %22%22%22Clean the input file s.t. it contains (a b) undirected edge only once. %22%22%22%0A    lines = set()%0A    with open(file_path) as input_file:%0A        for line in input_file:%0A            l = line.rstrip().split(%22%5Ct%22)%0A            l = sorted(l)%0A            lines.add(%22%5Ct%22.join(l))%0A%0A    lines = sorted(lines)%0A    with open(file_path + OUTPUT_SUFFIX, %22w%22) as output_file:%0A        for line in lines:%0A            print(line, file=output_file)%0A%0A%0Aif __name__ == '__main__':%0A    clean_input_file(sys.argv%5B1%5D)%0A

add input cleaner script