code: def test_transformer_fails_without_model():
      transformer = Transformer(
          model_name="remote-model",
          sagemaker_session=test_local_mode.LocalNoS3Session(),
          instance_type="local",
          instance_count=1,
      )
  
      with pytest.raises(ValueError) as error:
          transformer.transform("empty-data")
  
      assert (
          str(error.value)
          == "Failed to fetch model information for remote-model. "
          "Please ensure that the model exists. "
          "Local instance types require locally created models."
      )
  
imports: from __future__ import absolute_import
  import pytest
  from mock import MagicMock, Mock, patch, PropertyMock
  from sagemaker.session_settings import SessionSettings
  from sagemaker.transformer import _TransformJob, Transformer
  from sagemaker.workflow.pipeline_context import PipelineSession, _PipelineConfig
  from sagemaker.inputs import BatchDataCaptureConfig
  from sagemaker.workflow.pipeline_definition_config import PipelineDefinitionConfig
  from tests.integ import test_local_mode
  from tests.unit import SAGEMAKER_CONFIG_TRANSFORM_JOB
label_desc: Use image node_id 7 for calling a global function with example usage: test_transformer_fails_without_model() without return types