def fetch_from_graph(list_of_names, graph):
    """ Returns a list of shared variables from the graph """
    if "__datasets_added__" not in graph.keys():
        # Check for dataset in graph
        raise AttributeError("No dataset in graph! Make sure to add "
                             "the dataset using add_datasets_to_graph")
    return [graph[name] for name in list_of_names]
dataset/ETHPy150Open kastnerkyle/SciPy2015/graphics_code/cvae/kdl_template.py/fetch_from_graph/original