def METHOD_NAME(d, keys):
    """Remove keys from a dictionary (nested).
    :param d: dictionary from which the keys are to be removed.
    :type d: dict
    :param keys: keys to be removed (list of str)
    :type keys: list
    """
    if isinstance(d, dict):
        return dict((k, METHOD_NAME(v, keys)) for k, v in d.items()
                    if k not in keys)
    elif isinstance(d, list):
        return list(METHOD_NAME(i, keys) for i in d)
    else:
        return d