import copy


def _prune_keys(in_dict, *keys):
    """remove key(s) and their values if they exist in the dict."""
    dict_ = copy.deepcopy(in_dict)

    for key in keys:
        if dict_.get(key):
            dict_.pop(key)
    return dict_