def get_graph_from_file(file_path):
    """
    Returns an adjacency list for a graph represented in text file, where
    each line of the text file has the first element as the node, and each
    subsequent tab-delimited element defines an edge.
    """
    f = open(file_path)
    graph = {}
    for l in f:
        tempArr = l.split('\t')
        tempArr.remove('\n')
        graph[int(tempArr[0])] = [int(x) for x in tempArr[1:len(tempArr)]]
    return graph