def dict_pop(dict_, pop_keys, default=None):
    'Removes keys from a dict and returns their values.\n\n    Args:\n        dict_ (dict): A dictionary from which items are removed.\n        pop_keys: A key or a list of keys to remove and return respective\n            values or :attr:`default`.\n        default (optional): Value to be returned when a key is not in\n            :attr:`dict_`. The default value is `None`.\n\n    Returns:\n        A `dict` of the items removed from :attr:`dict_`.\n    '
    if (not isinstance(pop_keys, (list, tuple))):
        pop_keys = [pop_keys]
    ret_dict = {key: dict_.pop(key, default) for key in pop_keys}
    return ret_dict
Removes keys from a dict and returns their values.

Args:
    dict_ (dict): A dictionary from which items are removed.
    pop_keys: A key or a list of keys to remove and return respective
        values or :attr:`default`.
    default (optional): Value to be returned when a key is not in
        :attr:`dict_`. The default value is `None`.

Returns:
    A `dict` of the items removed from :attr:`dict_`.
def dict_pop(dict_, pop_keys, default=None):
    'Removes keys from a dict and returns their values.\n\n    Args:\n        dict_ (dict): A dictionary from which items are removed.\n        pop_keys: A key or a list of keys to remove and return respective\n            values or :attr:`default`.\n        default (optional): Value to be returned when a key is not in\n            :attr:`dict_`. The default value is `None`.\n\n    Returns:\n        A `dict` of the items removed from :attr:`dict_`.\n    '
    if (not isinstance(pop_keys, (list, tuple))):
        pop_keys = [pop_keys]
    ret_dict = {key: dict_.pop(key, default) for key in pop_keys}
    return ret_dict