def METHOD_NAME(spec, wrapped):
    new_spec = {}
    for k, v in spec.items():
        if not hasattr(wrapped.__class__, k):
            print("  '{}' is not a valid field for '{}'. Dropping."
                  .format(k, wrapped.__class__.__name__))
        elif getattr(wrapped.__class__, k).default() == v:
            print("  Dropping parameter '{}' because '{}' is the default".format(k, v))
        else:
            new_spec[k] = v
    return new_spec