def get_node_overview(data, requested_nodes):
    """
    Creates a dictionary with all node keys as keys, and as value another dictionary which has
    all attribute names as keys and the corresponding values as values.
    :param data: The data objects corresponding to the nodes
    :param requested_nodes: The nodes to make an overview for
    :return: The overview
    """
    overview = {}
    for node in requested_nodes:
        overview[node.pk] = {'latitude': node.latitude, 'longitude': node.longitude}
        for data_object in data.filter(node=node):
            overview[node.pk][data_object.attribute.name] = data_object.value
    return overview