def METHOD_NAME(test_class, api_version, is_hsm, **kwargs):
    self._skip_if_not_configured(api_version, is_hsm)
    if not self.is_logging_enabled:
        kwargs.update({"logging_enable": False})
    endpoint_url = self.managed_hsm_url if is_hsm else self.vault_url
    client = self.create_key_client(endpoint_url, api_version=api_version, **kwargs)
    with client:
        fn(test_class, client, is_hsm=is_hsm, managed_hsm_url=self.managed_hsm_url, vault_url=self.vault_url)