def METHOD_NAME(obj):
    @functools.wraps(obj)
    def func_wrapped(*args, **kwargs):
        if is_installed(name, version):
            return obj(*args, **kwargs)
        else:
            msg = f'"{obj}" in "{obj.__module__}" requires "{name}'
            if version is not None:
                msg += f" {version}"
            raise ImportError(msg + '"')
    return func_wrapped