def check_no_hp_in_lhn(ind, do_correction=True):
    """
    Checks if individuum dict holds HP within LHN. If yes and do_correction is
    True, erases HP from LHN.

    Parameters
    ----------
    ind : dict
        Individuum dict for GA run
    do_correction : bool, optional
        Defines, if ind dict should be modified, if necessary (default: True).
        If True, can erase HP form LHN network building nodes.

    Returns
    -------
    is_correct : bool
        Boolean to define, if no heat pump is found within ind dict.
        If True, no heat pump has been found. If False, HP exists in LHN
        network
    """

    is_correct = True

    # check if heatpump is connected to LHN at ind1
    if len(ind['lhn']) > 0:
        for subcity in ind['lhn']:
            for node in subcity:
                if ind[node]['hp_aw'] > 0 or ind[node]['hp_ww'] > 0:
                    is_correct = False
                    if do_correction:
                        # if node has lhn and hp delete lhn connection
                        subcity.remove(node)
                    else:  # pragma: no cover
                        break

    return is_correct