code: def test_processor_with_custom_bucket(
      sagemaker_session_with_custom_bucket,
      custom_bucket_name,
      image_uri,
      cpu_instance_type,
      output_kms_key,
      input_kms_key,
  ):
      script_path = os.path.join(DATA_DIR, "dummy_script.py")
  
      processor = Processor(
          role=ROLE,
          image_uri=image_uri,
          instance_count=1,
          instance_type=cpu_instance_type,
          entrypoint=[
              "python3",
              "/opt/ml/processing/input/code/dummy_script.py",
          ],
          volume_size_in_gb=100,
          volume_kms_key=None,
          output_kms_key=output_kms_key,
          max_runtime_in_seconds=3600,
          base_job_name="test-processor",
          env={"DUMMY_ENVIRONMENT_VARIABLE": "dummy-value"},
          tags=[{"Key": "dummy-tag", "Value": "dummy-tag-value"}],
          sagemaker_session=sagemaker_session_with_custom_bucket,
      )
  
      processor.run(
          inputs=[
              ProcessingInput(
                  source=script_path,
                  destination="/opt/ml/processing/input/code/",
                  input_name="code",
              )
          ],
          kms_key=input_kms_key,
          outputs=[
              ProcessingOutput(
                  source="/opt/ml/processing/output/container/path/",
                  output_name="dummy_output",
                  s3_upload_mode="EndOfJob",
              )
          ],
          arguments=["-v"],
          wait=True,
          logs=True,
      )
  
      job_description = processor.latest_job.describe()
  
      assert (
          job_description["ProcessingInputs"][0]["InputName"] == "code"
      )
      assert (
          custom_bucket_name
          in job_description["ProcessingInputs"][0]["S3Input"]["S3Uri"]
      )
  
      assert job_description["ProcessingJobName"].startswith(
          "test-processor"
      )
  
      assert job_description["ProcessingJobStatus"] == "Completed"
  
      assert (
          job_description["ProcessingOutputConfig"]["KmsKeyId"]
          == output_kms_key
      )
      assert (
          job_description["ProcessingOutputConfig"]["Outputs"][0][
              "OutputName"
          ]
          == "dummy_output"
      )
  
      assert (
          job_description["ProcessingResources"]["ClusterConfig"][
              "InstanceCount"
          ]
          == 1
      )
      assert (
          job_description["ProcessingResources"]["ClusterConfig"][
              "InstanceType"
          ]
          == cpu_instance_type
      )
      assert (
          job_description["ProcessingResources"]["ClusterConfig"][
              "VolumeSizeInGB"
          ]
          == 100
      )
  
      assert job_description["AppSpecification"][
          "ContainerArguments"
      ] == ["-v"]
      assert job_description["AppSpecification"][
          "ContainerEntrypoint"
      ] == [
          "python3",
          "/opt/ml/processing/input/code/dummy_script.py",
      ]
      assert (
          job_description["AppSpecification"]["ImageUri"] == image_uri
      )
  
      assert job_description["Environment"] == {
          "DUMMY_ENVIRONMENT_VARIABLE": "dummy-value"
      }
  
      assert ROLE in job_description["RoleArn"]
  
      assert job_description["StoppingCondition"] == {
          "MaxRuntimeInSeconds": 3600
      }
  
imports: from __future__ import absolute_import
  import os
  import pytest
  from botocore.config import Config
  from sagemaker import image_uris, Session
  from sagemaker.dataset_definition.inputs import DatasetDefinition, RedshiftDatasetDefinition, AthenaDatasetDefinition, S3Input
  from sagemaker.network import NetworkConfig
  from sagemaker.processing import ProcessingInput, ProcessingOutput, ScriptProcessor, Processor, ProcessingJob, FeatureStoreOutput
  from sagemaker.sklearn.processing import SKLearnProcessor
  from tests.integ import DATA_DIR
  from tests.integ.kms_utils import get_or_create_kms_key
label_desc: Use image node_id 13 for calling a global function with example usage: test_processor_with_custom_bucket(sagemaker_session_with_custom_bucket, custom_bucket_name, image_uri, cpu_instance_type, output_kms_key, input_kms_key) without return types