def loadTazEdges(inFilename):
    """Converts list of OSM edges per OSM edge and groups per TAZ
    format is csv with first two columns the OSM id and TAZ id, then the list of SUMO edge id

    Returns the list of SUMO edge per TAZ"""
    data = []
    tazs = {}
    with open(inFilename, 'r') as f:
        f.readline()
        for r in f:
            tmp = r.strip().split(',')
            tazID = tmp[1]
            for edge in tmp[2:]:
                if len(edge) > 0:
                    if tazID in tazs:
                        if edge not in tazs[tazID]:
                            tazs[tazID].append(edge)
                    else:
                        tazs[tazID] = [edge]
    return tazs
