in uberpoet/dotreader.py [0:0]
def make_dep_map_from_edges(edges):
# type: (List[List[str]]) -> Dict[str, List[str]]
"""Converts a raw [(origin,destination)] edge list into a {origin:[destinations]} outgoing edge map."""
dep_map = defaultdict(list)
for pair in edges:
origin, destination = pair
dep_map[origin] += [destination]
return dict(dep_map)