def METHOD_NAME(attribute, **kwargs):
    # Check if the decorator has already been added
    if attribute.__dict__.get(_deprecate_pos_args.FLAG_NAME):
        return attribute
    # Get the signature to test if all args are keyword only
    sig = signature(attribute)
    incorrect_params = [
        n
        for n, p in sig.parameters.items()
        if n != "self"
        and (
            p.kind == Parameter.POSITIONAL_ONLY
            or p.kind == Parameter.POSITIONAL_OR_KEYWORD
        )
    ]
    assert len(incorrect_params) == 0, (
        "Error in `{}`!. Positional arguments for estimators (that derive "
        "from `Base`) have been deprecated but parameters '{}' can still "
        "be used as positional arguments. Please specify all parameters "
        "after `self` as keyword only by using the `*` argument"
    ).format(attribute.__qualname__, ", ".join(incorrect_params))
    return _deprecate_pos_args(**kwargs)(attribute)