code: def test_script_processor_with_sagemaker_config_injection(
      exists_mock, isfile_mock, sagemaker_session
  ):
      sagemaker_session.sagemaker_config = (
          SAGEMAKER_CONFIG_PROCESSING_JOB
      )
  
      sagemaker_session.default_bucket = Mock(
          name="default_bucket", return_value=BUCKET_NAME
      )
      sagemaker_session.upload_data = Mock(
          name="upload_data", return_value=MOCKED_S3_URI
      )
      sagemaker_session.wait_for_processing_job = MagicMock(
          name="wait_for_processing_job",
          return_value=_get_describe_response_inputs_and_ouputs(),
      )
      sagemaker_session.process = Mock()
      sagemaker_session.expand_role = Mock(
          name="expand_role", side_effect=lambda a: a
      )
  
      processor = ScriptProcessor(
          image_uri=CUSTOM_IMAGE_URI,
          command=["python3"],
          instance_type="ml.m4.xlarge",
          instance_count=1,
          volume_size_in_gb=100,
          max_runtime_in_seconds=3600,
          base_job_name="my_sklearn_processor",
          tags=[{"Key": "my-tag", "Value": "my-tag-value"}],
          sagemaker_session=sagemaker_session,
      )
      processor.run(
          code="/local/path/to/processing_code.py",
          inputs=_get_data_inputs_all_parameters(),
          outputs=_get_data_outputs_all_parameters(),
          arguments=["--drop-columns", "'SelfEmployed'"],
          wait=True,
          logs=False,
          job_name="my_job_name",
          experiment_config={"ExperimentName": "AnExperiment"},
      )
      expected_args = copy.deepcopy(
          _get_expected_args_all_parameters(processor._current_job_name)
      )
      expected_volume_kms_key_id = SAGEMAKER_CONFIG_PROCESSING_JOB[
          "SageMaker"
      ]["ProcessingJob"]["ProcessingResources"]["ClusterConfig"][
          "VolumeKmsKeyId"
      ]
      expected_output_kms_key_id = SAGEMAKER_CONFIG_PROCESSING_JOB[
          "SageMaker"
      ]["ProcessingJob"]["ProcessingOutputConfig"]["KmsKeyId"]
      expected_role_arn = SAGEMAKER_CONFIG_PROCESSING_JOB["SageMaker"][
          "ProcessingJob"
      ]["RoleArn"]
      expected_vpc_config = SAGEMAKER_CONFIG_PROCESSING_JOB[
          "SageMaker"
      ]["ProcessingJob"]["NetworkConfig"]["VpcConfig"]
      expected_enable_network_isolation = (
          SAGEMAKER_CONFIG_PROCESSING_JOB["SageMaker"]["ProcessingJob"][
              "NetworkConfig"
          ]["EnableNetworkIsolation"]
      )
      expected_enable_inter_containter_traffic_encryption = (
          SAGEMAKER_CONFIG_PROCESSING_JOB["SageMaker"]["ProcessingJob"][
              "NetworkConfig"
          ]["EnableInterContainerTrafficEncryption"]
      )
      expected_environment = SAGEMAKER_CONFIG_PROCESSING_JOB[
          "SageMaker"
      ]["ProcessingJob"]["Environment"]
  
      expected_args["resources"]["ClusterConfig"][
          "VolumeKmsKeyId"
      ] = expected_volume_kms_key_id
      expected_args["output_config"][
          "KmsKeyId"
      ] = expected_output_kms_key_id
      expected_args["role_arn"] = expected_role_arn
      expected_args["network_config"]["VpcConfig"] = expected_vpc_config
      expected_args["network_config"][
          "EnableNetworkIsolation"
      ] = expected_enable_network_isolation
      expected_args["network_config"][
          "EnableInterContainerTrafficEncryption"
      ] = expected_enable_inter_containter_traffic_encryption
      expected_args["environment"] = expected_environment
  
      sagemaker_session.process.assert_called_with(**expected_args)
      assert "my_job_name" in processor._current_job_name
  
imports: from __future__ import absolute_import
  import copy
  import pytest
  from mock import Mock, patch, MagicMock
  from packaging import version
  from sagemaker import LocalSession
  from sagemaker.dataset_definition.inputs import S3Input, DatasetDefinition, AthenaDatasetDefinition, RedshiftDatasetDefinition
  from sagemaker.processing import ProcessingInput, ProcessingOutput, Processor, ScriptProcessor, ProcessingJob
  from sagemaker.session_settings import SessionSettings
  from sagemaker.spark.processing import PySparkProcessor
  from sagemaker.sklearn.processing import SKLearnProcessor
  from sagemaker.pytorch.processing import PyTorchProcessor
  from sagemaker.tensorflow.processing import TensorFlowProcessor
  from sagemaker.workflow.pipeline_definition_config import PipelineDefinitionConfig
  from sagemaker.xgboost.processing import XGBoostProcessor
  from sagemaker.mxnet.processing import MXNetProcessor
  from sagemaker.network import NetworkConfig
  from sagemaker.processing import FeatureStoreOutput
  from sagemaker.fw_utils import UploadedCode
  from sagemaker.workflow.pipeline_context import PipelineSession, _PipelineConfig
  from sagemaker.workflow.functions import Join
  from sagemaker.workflow.execution_variables import ExecutionVariables
  from tests.unit import SAGEMAKER_CONFIG_PROCESSING_JOB
label_desc: Use image node_id 25 for calling a global function with example usage: test_script_processor_with_sagemaker_config_injection(exists_mock, isfile_mock, sagemaker_session) without return types