def edge_list_get_tail_index(edge_list, tail_index):
    """
    Takes a list of edges and returns an edge if the tail_index matches the
    given index, or None otherwise.
    """
    for edge in edge_list :
        if edge.tail_index == tail_index :
            return edge
    return None