code: def test_single_automl_step_with_parameter(pipeline_session):
      target_parameter = ParameterString(name="y")
      auto_ml = AutoML(
          role=ROLE,
          target_attribute_name=target_parameter,
          sagemaker_session=pipeline_session,
          volume_kms_key="volume-kms-key-id-string",
          vpc_config={
              "SecurityGroupIds": ["group"],
              "Subnets": ["subnet"],
          },
          encrypt_inter_container_traffic=False,
          compression_type="Gzip",
          output_kms_key="output-kms-key-id-string",
          output_path="s3://my_other_bucket/",
          problem_type="BinaryClassification",
          max_candidates=1,
          max_runtime_per_training_job_in_seconds=3600,
          total_job_runtime_in_seconds=36000,
          job_objective={"MetricName": "F1"},
          generate_candidate_definitions_only=False,
          tags=[{"Name": "some-tag", "Value": "value-for-tag"}],
          content_type="x-application/vnd.amazon+parquet",
          s3_data_type="ManifestFile",
          feature_specification_s3_uri="s3://bucket/features.json",
          validation_fraction=0.3,
          mode="ENSEMBLING",
          auto_generate_endpoint_name=False,
          endpoint_name="EndpointName",
      )
      input_training = AutoMLInput(
          inputs="s3://bucket/data",
          target_attribute_name=target_parameter,
          compression="Gzip",
          channel_type="training",
      )
      input_validation = AutoMLInput(
          inputs="s3://bucket/validation_data",
          target_attribute_name=target_parameter,
          compression="Gzip",
          channel_type="validation",
      )
      inputs = [input_training, input_validation]
  
      step_args = auto_ml.fit(
          inputs=inputs,
      )
  
      automl_step = AutoMLStep(
          name="MyAutoMLStep",
          step_args=step_args,
      )
  
      assert (
          automl_step.properties.BestCandidateProperties.ModelInsightsJsonReportPath.expr
          == {
              "Get": "Steps.MyAutoMLStep.BestCandidateProperties.ModelInsightsJsonReportPath"
          }
      )
      assert (
          automl_step.properties.BestCandidateProperties.ModelInsightsJsonReportPath._referenced_steps
          == [automl_step]
      )
      assert (
          automl_step.properties.BestCandidateProperties.ExplainabilityJsonReportPath.expr
          == {
              "Get": "Steps.MyAutoMLStep.BestCandidateProperties.ExplainabilityJsonReportPath"
          }
      )
  
      pipeline = Pipeline(
          name="MyPipeline",
          parameters=[target_parameter],
          steps=[automl_step],
          sagemaker_session=pipeline_session,
      )
  
      step_dsl_list = json.loads(pipeline.definition())["Steps"]
      assert step_dsl_list[0] == {
          "Name": "MyAutoMLStep",
          "Type": "AutoML",
          "Arguments": {
              "AutoMLJobConfig": {
                  "CandidateGenerationConfig": {
                      "FeatureSpecificationS3Uri": "s3://bucket/features.json"
                  },
                  "DataSplitConfig": {"ValidationFraction": 0.3},
                  "Mode": "ENSEMBLING",
                  "CompletionCriteria": {
                      "MaxAutoMLJobRuntimeInSeconds": 36000,
                      "MaxCandidates": 1,
                      "MaxRuntimePerTrainingJobInSeconds": 3600,
                  },
                  "SecurityConfig": {
                      "EnableInterContainerTrafficEncryption": False,
                      "VolumeKmsKeyId": "volume-kms-key-id-string",
                      "VpcConfig": {
                          "SecurityGroupIds": ["group"],
                          "Subnets": ["subnet"],
                      },
                  },
              },
              "AutoMLJobObjective": {"MetricName": "F1"},
              "InputDataConfig": [
                  {
                      "ChannelType": "training",
                      "CompressionType": "Gzip",
                      "DataSource": {
                          "S3DataSource": {
                              "S3DataType": "S3Prefix",
                              "S3Uri": "s3://bucket/data",
                          }
                      },
                      "TargetAttributeName": {"Get": "Parameters.y"},
                  },
                  {
                      "ChannelType": "validation",
                      "CompressionType": "Gzip",
                      "DataSource": {
                          "S3DataSource": {
                              "S3DataType": "S3Prefix",
                              "S3Uri": "s3://bucket/validation_data",
                          }
                      },
                      "TargetAttributeName": {"Get": "Parameters.y"},
                  },
              ],
              "OutputDataConfig": {
                  "KmsKeyId": "output-kms-key-id-string",
                  "S3OutputPath": "s3://my_other_bucket/",
              },
              "ProblemType": "BinaryClassification",
              "RoleArn": "DummyRole",
              "Tags": [{"Name": "some-tag", "Value": "value-for-tag"}],
          },
      }
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/workflow/test_automl_step.py
imports: from __future__ import absolute_import
  import json
  import pytest
  from sagemaker.automl.automl import AutoML, AutoMLInput
  from sagemaker.exceptions import AutoMLStepInvalidModeError
  from sagemaker.workflow import ParameterString
  from sagemaker.workflow.automl_step import AutoMLStep
  from sagemaker.workflow.model_step import ModelStep
  from sagemaker.workflow.pipeline import Pipeline
  from sagemaker.workflow.pipeline_definition_config import PipelineDefinitionConfig
  from tests.unit.sagemaker.workflow.conftest import ROLE
label_desc: Use image node_id 2 for calling a global function with example usage: test_single_automl_step_with_parameter(pipeline_session) without return types