code: def test_model_package_create_transformer(sagemaker_session):
      model_package = ModelPackage(
          role="role",
          model_package_arn="my-model-package",
          sagemaker_session=sagemaker_session,
      )
      model_package.name = "auto-generated-model"
      transformer = model_package.transformer(
          instance_count=1,
          instance_type="ml.m4.xlarge",
          env={"test": True},
      )
      assert isinstance(transformer, sagemaker.transformer.Transformer)
      assert transformer.model_name == "auto-generated-model"
      assert transformer.instance_type == "ml.m4.xlarge"
      assert transformer.env == {"test": True}
  
imports: from __future__ import absolute_import
  import copy
  import pytest
  from mock import Mock, patch
  import sagemaker
  from sagemaker.model import ModelPackage
  from sagemaker.model_card.schema_constraints import ModelApprovalStatusEnum
label_desc: Use image node_id 11 for calling a global function with example usage: test_model_package_create_transformer(sagemaker_session) without return types