def METHOD_NAME(*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 + '"')