def embeddings_dict(path):
    """
    Function that opens a file containing node features and returns a dictionary of nodes as keys
    and features list as values.

    :param path: path to file containing features/embeddings of all nodes
    :returns embeddings: a dictionary
    """
    with open(path, 'r') as file:
        file_lines = file.readlines()
    embeddings = {}
    for line in file_lines[1:]:
        line = line.split(' ')
        node = str(int(line[0]))
        feature = [float(i) for i in line[1:]]
        embeddings[node] = feature

    return embeddings