code: def test_inference_pipeline_batch_transform(
      sagemaker_session, cpu_instance_type
  ):
      sparkml_model_data = sagemaker_session.upload_data(
          path=os.path.join(SPARKML_DATA_PATH, "mleap_model.tar.gz"),
          key_prefix="integ-test-data/sparkml/model",
      )
      xgb_model_data = sagemaker_session.upload_data(
          path=os.path.join(XGBOOST_DATA_PATH, "xgb_model.tar.gz"),
          key_prefix="integ-test-data/xgboost/model",
      )
      batch_job_name = unique_name_from_base(
          "test-inference-pipeline-batch"
      )
      sparkml_model = SparkMLModel(
          model_data=sparkml_model_data,
          env={"SAGEMAKER_SPARKML_SCHEMA": SCHEMA},
          sagemaker_session=sagemaker_session,
      )
      xgb_image = image_uris.retrieve(
          "xgboost",
          sagemaker_session.boto_region_name,
          version="1",
          image_scope="inference",
      )
      xgb_model = Model(
          model_data=xgb_model_data,
          image_uri=xgb_image,
          sagemaker_session=sagemaker_session,
      )
      model = PipelineModel(
          models=[sparkml_model, xgb_model],
          role="SageMakerRole",
          sagemaker_session=sagemaker_session,
          name=batch_job_name,
      )
      transformer = model.transformer(1, cpu_instance_type)
      transform_input_key_prefix = (
          "integ-test-data/sparkml_xgboost/transform"
      )
      transform_input = transformer.sagemaker_session.upload_data(
          path=VALID_DATA_PATH, key_prefix=transform_input_key_prefix
      )
  
      with timeout_and_delete_model_with_transformer(
          transformer,
          sagemaker_session,
          minutes=TRANSFORM_DEFAULT_TIMEOUT_MINUTES,
      ):
          transformer.transform(
              transform_input,
              content_type="text/csv",
              job_name=batch_job_name,
          )
          transformer.wait()
  
file_path: sagemaker-python-sdk/tests/integ/test_inference_pipeline.py
imports: from __future__ import absolute_import
  import json
  import os
  import pytest
  from tests.integ import DATA_DIR, TRANSFORM_DEFAULT_TIMEOUT_MINUTES
  from tests.integ.timeout import timeout_and_delete_endpoint_by_name, timeout_and_delete_model_with_transformer
  from sagemaker import image_uris
  from sagemaker.model import Model
  from sagemaker.pipeline import PipelineModel
  from sagemaker.predictor import Predictor
  from sagemaker.serializers import JSONSerializer
  from sagemaker.sparkml.model import SparkMLModel
  from sagemaker.utils import unique_name_from_base
label_desc: Use image node_id 1 for calling a global function with example usage: test_inference_pipeline_batch_transform(sagemaker_session, cpu_instance_type) without return types