code: def test_local_transform_job_perform_batch_inference(
      get_config_value,
      move_to_destination,
      get_data_source_instance,
      get_batch_strategy_instance,
      local_transform_job,
      tmpdir,
  ):
      input_data = {
          "DataSource": {
              "S3DataSource": {"S3Uri": "s3://some_bucket/nice/data"}
          },
          "ContentType": "text/csv",
      }
  
      output_data = {
          "S3OutputPath": "s3://bucket/output",
          "AssembleWith": "Line",
      }
  
      transform_kwargs = {
          "MaxPayloadInMB": 3,
          "BatchStrategy": "MultiRecord",
      }
  
      data_source = Mock()
      data_source.get_file_list.return_value = [
          "/tmp/file1",
          "/tmp/file2",
      ]
      data_source.get_root_dir.return_value = "/tmp"
      get_data_source_instance.return_value = data_source
  
      batch_strategy = Mock()
      batch_strategy.pad.return_value = "some data"
      get_batch_strategy_instance.return_value = batch_strategy
  
      get_config_value.return_value = str(tmpdir)
  
      runtime_client = Mock()
      response_object = Mock()
      response_object.read.return_value = b"data"
      runtime_client.invoke_endpoint.return_value = {
          "Body": response_object
      }
      local_transform_job.local_session.sagemaker_runtime_client = (
          runtime_client
      )
  
      local_transform_job.container = Mock()
  
      local_transform_job._perform_batch_inference(
          input_data, output_data, **transform_kwargs
      )
  
      dir, output, job_name, session = move_to_destination.call_args[0]
      assert output == "s3://bucket/output"
      output_files = os.listdir(dir)
      assert len(output_files) == 2
      assert "file1.out" in output_files
      assert "file2.out" in output_files
  
imports: from __future__ import absolute_import
  import os
  import pytest
  from mock import patch, Mock
  from botocore.exceptions import ClientError
  import sagemaker.local
  from sagemaker.workflow.parameters import ParameterString
  from sagemaker.workflow.pipeline import Pipeline
  from sagemaker.workflow.lambda_step import LambdaStep
  from tests.unit.sagemaker.workflow.helpers import CustomStep
label_desc: Use image node_id 8 for calling a global function with example usage: test_local_transform_job_perform_batch_inference(get_config_value, move_to_destination, get_data_source_instance, get_batch_strategy_instance, local_transform_job, tmpdir) without return types