def get_list_build_without_energy_network(city):
    """
    Returns list of building entity nodes, which are neither connected to a
    heating nor to an decentralized electrical network.

    Parameters
    ----------
    city : object
        City object of pyCity_calc

    Returns
    -------
    list_single_build : list
        List holding building entity node ids (int) of buildings, which are
        neither connected to a heating nor to an decentralized electrical
        network
    """

    #  Get list of all building entities
    list_b_entities = city.get_list_build_entity_node_ids()

    #  Identify all single buildings (in city, but not LHN or DEG
    #  connected
    list_single_build = []

    for n in list_b_entities:
        #  Add all buildings without graph neighbours
        if len(list(city.neighbors(n))) == 0:
            list_single_build.append(n)
        # If buildings are connected to graph, check network_type
        else:
            valid_net = True
            for k in city.neighbors(n):
                if 'network_type' in city.edges[k, n]:
                    net_type = city.edges[k, n]['network_type']
                    if (net_type == 'heating' or
                                net_type == 'heating_and_deg' or
                                net_type == 'electricity'):
                        valid_net = False
                        break
                if 'network_type' in city.edges[n, k]:
                    net_type = city.edges[n, k]['network_type']
                    if (net_type == 'heating' or
                                net_type == 'heating_and_deg' or
                                net_type == 'electricity'):
                        valid_net = False
                        break

            if valid_net:
                list_single_build.append(n)

    return list_single_build