code: def test_estimator_transformer(estimator):
      model_data = f"s3://{BUCKET}/model.tar.gz"
      model_inputs = CreateModelInput(
          instance_type="c4.4xlarge",
          accelerator_type="ml.eia1.medium",
      )
      service_fault_retry_policy = StepRetryPolicy(
          exception_types=[StepExceptionTypeEnum.SERVICE_FAULT],
          max_attempts=10,
      )
      transform_inputs = TransformInput(
          data=f"s3://{BUCKET}/transform_manifest"
      )
      estimator_transformer = EstimatorTransformer(
          name="EstimatorTransformerStep",
          estimator=estimator,
          model_data=model_data,
          model_inputs=model_inputs,
          instance_count=1,
          instance_type="ml.c4.4xlarge",
          transform_inputs=transform_inputs,
          depends_on=["TestStep"],
          model_step_retry_policies=[service_fault_retry_policy],
          transform_step_retry_policies=[service_fault_retry_policy],
          repack_model_step_retry_policies=[service_fault_retry_policy],
      )
      request_dicts = estimator_transformer.request_dicts()
      assert len(request_dicts) == 2
  
      for request_dict in request_dicts:
          if request_dict["Type"] == "Model":
              assert request_dict == {
                  "Name": "EstimatorTransformerStepCreateModelStep",
                  "Type": "Model",
                  "DependsOn": ["TestStep"],
                  "RetryPolicies": [
                      service_fault_retry_policy.to_request()
                  ],
                  "Arguments": {
                      "ExecutionRoleArn": "DummyRole",
                      "PrimaryContainer": {
                          "Environment": {},
                          "Image": "fakeimage",
                          "ModelDataUrl": "s3://my-bucket/model.tar.gz",
                      },
                  },
              }
          elif request_dict["Type"] == "Transform":
              assert (
                  request_dict["Name"]
                  == "EstimatorTransformerStepTransformStep"
              )
              assert request_dict["RetryPolicies"] == [
                  service_fault_retry_policy.to_request()
              ]
              arguments = request_dict["Arguments"]
              assert isinstance(arguments["ModelName"], Properties)
              arguments.pop("ModelName")
              assert "DependsOn" not in request_dict
              assert arguments == {
                  "TransformInput": {
                      "DataSource": {
                          "S3DataSource": {
                              "S3DataType": "S3Prefix",
                              "S3Uri": f"s3://{BUCKET}/transform_manifest",
                          }
                      }
                  },
                  "TransformOutput": {"S3OutputPath": None},
                  "TransformResources": {
                      "InstanceCount": 1,
                      "InstanceType": "ml.c4.4xlarge",
                  },
              }
          else:
              raise Exception(
                  "A step exists in the collection of an invalid type."
              )
  
imports: from __future__ import absolute_import
  import json
  import os
  import tempfile
  import shutil
  import pytest
  from sagemaker.drift_check_baselines import DriftCheckBaselines
  from sagemaker.workflow._utils import REPACK_SCRIPT_LAUNCHER
  from sagemaker.workflow.condition_step import ConditionStep
  from sagemaker.workflow.conditions import ConditionEquals
  from sagemaker.workflow.model_step import ModelStep, _CREATE_MODEL_NAME_BASE, _REPACK_MODEL_NAME_BASE
  from sagemaker.workflow.parameters import ParameterString
  from sagemaker.workflow.pipeline import Pipeline, PipelineGraph
  from sagemaker.workflow.utilities import list_to_request
  from tests.unit import DATA_DIR
  from sagemaker import PipelineModel
  from sagemaker.estimator import Estimator
  from sagemaker.model import Model, FrameworkModel
  from sagemaker.tensorflow import TensorFlow
  from sagemaker.inputs import CreateModelInput, TransformInput
  from sagemaker.model_metrics import MetricsSource, ModelMetrics
  from sagemaker.workflow.properties import Properties
  from sagemaker.workflow.steps import CreateModelStep
  from sagemaker.workflow.step_collections import EstimatorTransformer, StepCollection, RegisterModel
  from sagemaker.workflow.retry import StepRetryPolicy, StepExceptionTypeEnum
  from tests.unit.sagemaker.workflow.helpers import ordered, CustomStep
  from tests.unit.sagemaker.workflow.conftest import IMAGE_URI, ROLE, BUCKET, REGION
label_desc: Use image node_id 20 for calling a global function with example usage: test_estimator_transformer(estimator) without return types