def graph_list_to_features(graphs):
    """Get a TFRecord feature dictionary from a list of graphs.

    The features from each graph is prepended with a prefix and all
    added to the final dictionary at the same level.

    Parameters
    ----------
    graphs : [Graph]

    Returns
    -------
    features : dict (str -> Feature)

    """
    features = {}

    for i in range(len(graphs)):
        prefix = 'g{}_'.format(i)
        graph_feats = graphs[i].to_features()
        updated = {(prefix) + k : v for (k, v) in graph_feats.items()}
        features.update(updated)

    return features