def connected_comp_edge_handler(graph, edge_weight='weight'):
    """
    Modified version of contract_edges used to handle edges in strongly_connected_comp_splitter. Modified by JC.
    Args:
        graph (NetworkX MultiDiGraph): strongly connected component graph
        edge_weight (str): edge attribute to use as weight
    Returns:
        list of tuples: [(edge node 1, edge node 2, edge attr dict)]
    """
    packaged_edges = []
    for e in graph.edges(data=True):
        if 'name' in e[2]:
            street_name = e[2]['name']
        elif 'junction' in e[2]:
            street_name = 'junction_' + e[2]['junction']
        else:
            street_name = 'unlabeled'
        attr = {
                'start_node': e[0],
                'end_node': e[1],
                'distance': e[2][edge_weight],
                'path': [e[0], e[1]],
                'turn_length' : e[2]['turn_length'],
                'length': e[2][edge_weight],
                'name': street_name,
                'required': 1,
                }

        edge = (e[0], e[1], attr)
        packaged_edges += [edge]
    return packaged_edges