r"""
    Removes items from a dictionary inplace. Keys that do not exist are
    ignored.

    Args:
        dict_ (dict): dict like object with a __del__ attribute
        key_list (list): list of keys that specify the items to remove

    CommandLine:
        python -m utool.util_dict --test-delete_dict_keys

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_dict import *  # NOQA
        >>> import utool as ut
        >>> dict_ = {'bread': 1, 'churches': 1, 'cider': 2, 'very small rocks': 2}
        >>> key_list = ['duck', 'bread', 'cider']
        >>> delete_dict_keys(dict_, key_list)
        >>> result = ut.repr4(dict_, nl=False)
        >>> print(result)
        {'churches': 1, 'very small rocks': 2}

def delete_dict_keys(dict_, key_list):
    r"""
    Removes items from a dictionary inplace. Keys that do not exist are
    ignored.

    Args:
        dict_ (dict): dict like object with a __del__ attribute
        key_list (list): list of keys that specify the items to remove

    CommandLine:
        python -m utool.util_dict --test-delete_dict_keys

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_dict import *  # NOQA
        >>> import utool as ut
        >>> dict_ = {'bread': 1, 'churches': 1, 'cider': 2, 'very small rocks': 2}
        >>> key_list = ['duck', 'bread', 'cider']
        >>> delete_dict_keys(dict_, key_list)
        >>> result = ut.repr4(dict_, nl=False)
        >>> print(result)
        {'churches': 1, 'very small rocks': 2}

    """
    invalid_keys = set(key_list) - set(dict_.keys())
    valid_keys = set(key_list) - invalid_keys
    for key in valid_keys:
        del dict_[key]
    return dict_