code: def test_tuning_step_with_multi_algo_tuner(
      pipeline_session, entry_point
  ):
      pytorch_estimator = PyTorch(
          entry_point=entry_point,
          role=ROLE,
          framework_version="1.5.0",
          py_version="py3",
          instance_count=1,
          instance_type="ml.m5.xlarge",
          sagemaker_session=pipeline_session,
          enable_sagemaker_metrics=True,
          max_retry_attempts=3,
          hyperparameters={"static-hp": "hp1", "train_size": "1280"},
      )
  
      tuner = HyperparameterTuner.create(
          estimator_dict={
              "estimator-1": pytorch_estimator,
              "estimator-2": pytorch_estimator,
          },
          objective_metric_name_dict={
              "estimator-1": "test:acc",
              "estimator-2": "test:acc",
          },
          hyperparameter_ranges_dict={
              "estimator-1": {"batch-size": IntegerParameter(64, 128)},
              "estimator-2": {"batch-size": IntegerParameter(256, 512)},
          },
          metric_definitions_dict={
              "estimator-1": [
                  {
                      "Name": "test:acc",
                      "Regex": "Overall test accuracy: (.*?);",
                  }
              ],
              "estimator-2": [
                  {
                      "Name": "test:acc",
                      "Regex": "Overall test accuracy: (.*?);",
                  }
              ],
          },
      )
      input_path = (
          f"s3://{pipeline_session.default_bucket()}/training-data"
      )
      inputs = {
          "estimator-1": TrainingInput(s3_data=input_path),
          "estimator-2": TrainingInput(s3_data=input_path),
      }
      step_args = tuner.fit(
          inputs=inputs,
          include_cls_metadata={
              "estimator-1": False,
              "estimator-2": False,
          },
      )
  
      step = TuningStep(
          name="MyTuningStep",
          step_args=step_args,
      )
  
      pipeline = Pipeline(
          name="MyPipeline",
          steps=[step],
          sagemaker_session=pipeline_session,
      )
  
      step_args = get_step_args_helper(
          step_args, "HyperParameterTuning"
      )
      step_def = json.loads(pipeline.definition())["Steps"][0]
  
      for i, step in enumerate(step_args["TrainingJobDefinitions"]):
          # delete sagemaker_job_name b/c of timestamp collision
          del step_args["TrainingJobDefinitions"][i][
              "StaticHyperParameters"
          ]["sagemaker_job_name"]
          del step_def["Arguments"]["TrainingJobDefinitions"][i][
              "StaticHyperParameters"
          ]["sagemaker_job_name"]
  
          # delete S3 path assertions for now because job name is included with timestamp. These will be re-enabled after
          # caching improvements phase 2.
          del step_args["TrainingJobDefinitions"][i][
              "StaticHyperParameters"
          ]["sagemaker_submit_directory"]
          del step_def["Arguments"]["TrainingJobDefinitions"][i][
              "StaticHyperParameters"
          ]["sagemaker_submit_directory"]
  
      assert step_def == {
          "Name": "MyTuningStep",
          "Type": "Tuning",
          "Arguments": step_args,
      }
      adjacency_list = PipelineGraph.from_pipeline(
          pipeline
      ).adjacency_list
      assert adjacency_list == {"MyTuningStep": []}
  
      # test idempotency
      step_def2 = json.loads(pipeline.definition())["Steps"][0]
      for i, step in enumerate(
          step_def2["Arguments"]["TrainingJobDefinitions"]
      ):
          del step_def2["Arguments"]["TrainingJobDefinitions"][i][
              "StaticHyperParameters"
          ]["sagemaker_job_name"]
  
          del step_def2["Arguments"]["TrainingJobDefinitions"][i][
              "StaticHyperParameters"
          ]["sagemaker_submit_directory"]
      assert step_def == step_def2
  
imports: from __future__ import absolute_import
  import os
  import json
  import pytest
  import warnings
  from sagemaker import Model, Processor
  from sagemaker.estimator import Estimator
  from sagemaker.transformer import Transformer
  from sagemaker.workflow.pipeline_definition_config import PipelineDefinitionConfig
  from sagemaker.workflow.steps import TuningStep
  from sagemaker.inputs import TrainingInput
  from sagemaker.workflow.pipeline import Pipeline, PipelineGraph
  from sagemaker.workflow.parameters import ParameterString
  from sagemaker.workflow.functions import Join
  from sagemaker.tuner import HyperparameterTuner, IntegerParameter
  from sagemaker.pytorch.estimator import PyTorch
  from tests.unit import DATA_DIR
  from tests.unit.sagemaker.workflow.helpers import get_step_args_helper
  from tests.unit.sagemaker.workflow.conftest import ROLE, INSTANCE_TYPE, IMAGE_URI
label_desc: Use image node_id 3 for calling a global function with example usage: test_tuning_step_with_multi_algo_tuner(pipeline_session, entry_point) without return types