import copy


def remove_items(new_content, curr_contents):
    """

    :param new_content: Dict to update to curr_contents
    :type: dict

    :param curr_contents: Current dict content for conf file
    :type: dict

    :return: The result dict and changed flag
    :rtype: tuple[dict, bool]
    """
    shadow = copy.deepcopy(curr_contents)
    changed = False

    for section in new_content:
        if section not in shadow:
            continue

        if new_content.get(section) is None:
            del shadow[section]
            changed = True
            continue

        for key in new_content[section]:
            if key in shadow.get(section):
                changed = True
                del shadow.get(section)[key]

    return shadow, changed