def has_lhn_connection(ind, id):
    """
    Returns True, if node n of individuum ind has LHN connection. Else: False.

    Parameters
    ----------
    ind : dict
        Individuum dict
    id : int
        ID of building node

    Returns
    -------
    has_lhn : bool
        True, if node n has LHn connection. False, if not connected to LHN
    """

    if id not in ind:
        msg = 'Node ' + str(id) + ' is not within individuum ' + str(ind)
        raise AssertionError(msg)

    if 'lhn' not in ind:
        msg = 'Individuum dict does not have lhn attribute. Check input data.'
        raise AssertionError(msg)

    has_lhn = False  # Assumes no connection to LHN

    if len(ind['lhn']) > 0:
        #  Has LHN network(s)
        for sublhn in ind['lhn']:  # Loop over subnetworks
            for n in sublhn:  # Loop over nodes in network
                if n == id:
                    has_lhn = True
                    return has_lhn

    return has_lhn