def read_edge_list(path):
    """Read edge list in KONECT format."""
    with open(path, 'r') as f:
        edge_list = set()
        for line in f:
            if not line.lstrip().startswith("%"):  # ignore comments
                e = line.strip().split()
                edge_list.add((int(e[0]) - 1, int(e[1]) - 1))  # 0 index
        return list(edge_list)