code: def test_to_request_step_with_required_fields(
      self, mock_name_from_base, mock_execution_variables
  ):
      self.maxDiff = None
      expected_input_folder = "input-abc"
      mock_name_from_base.return_value = expected_input_folder
      mock_execution_variables.PIPELINE_EXECUTION_ID = Mock()
  
      notebook_step = self._create_step_with_required_fields()
      request = notebook_step.to_request()
  
      expected_request = {
          "Name": "NotebookStep",
          "Type": "Training",
          "Arguments": {
              "TrainingJobName": f"{notebook_step._underlying_job_prefix}",
              "RoleArn": "arn:aws:iam::123456789012:role/MySageMakerRole",
              "RetryStrategy": {"MaximumRetryAttempts": 1},
              "StoppingCondition": {"MaxRuntimeInSeconds": 172800},
              "EnableInterContainerTrafficEncryption": True,
              "AlgorithmSpecification": {
                  "TrainingImage": "236514542706.dkr.ecr.us-west-2.amazonaws.com/sagemaker-data-science-310@1",
                  "TrainingInputMode": "File",
                  "ContainerEntrypoint": ["amazon_sagemaker_scheduler"],
              },
              "InputDataConfig": [
                  {
                      "ChannelName": "sagemaker_headless_execution_pipelinestep",
                      "DataSource": {
                          "S3DataSource": {
                              "S3DataType": "S3Prefix",
                              "S3Uri": f"s3://my-bucket/abc/{PIPELINE_NAME}"
                              f"/NotebookStep/{expected_input_folder}",
                              "S3DataDistributionType": "FullyReplicated",
                          }
                      },
                  },
              ],
              "OutputDataConfig": {
                  "S3OutputPath": Join(
                      "/",
                      [
                          S3_ROOT_URI,
                          PIPELINE_NAME,
                          mock_execution_variables.PIPELINE_EXECUTION_ID,
                          STEP_NAME,
                      ],
                  )
              },
              "ResourceConfig": {
                  "VolumeSizeInGB": 30,
                  "InstanceCount": 1,
                  "InstanceType": "ml.m5.large",
              },
              "Tags": [
                  {"Key": "sagemaker:name", "Value": "MyNotebookJob"},
                  {
                      "Key": "sagemaker:notebook-name",
                      "Value": "notebook1_happypath.ipynb",
                  },
                  {
                      "Key": "sagemaker:notebook-job-origin",
                      "Value": "PIPELINE_STEP",
                  },
                  {
                      "Key": "sagemaker:is-studio-archived",
                      "Value": "false",
                  },
              ],
              "Environment": {
                  "AWS_DEFAULT_REGION": "us-west-2",
                  "SM_JOB_DEF_VERSION": "1.0",
                  "SM_ENV_NAME": "sagemaker-default-env",
                  "SM_SKIP_EFS_SIMULATION": "true",
                  "SM_EXECUTION_INPUT_PATH": "/opt/ml/input/data/sagemaker_headless_execution_pipelinestep",
                  "SM_KERNEL_NAME": "python3",
                  "SM_INPUT_NOTEBOOK_NAME": "notebook1_happypath.ipynb",
                  "SM_OUTPUT_NOTEBOOK_NAME": f"{notebook_step._underlying_job_prefix}.ipynb",
              },
          },
          "DisplayName": "Display Name",
          "Description": "Description",
      }
      self.assertEqual(request, expected_request)
      # Only verify it's called once as the logic uses a transient tmp folder with random name
      # The uploading function is also tested in integ testing.
  
      self.mocked_session.upload_data.assert_called_once()
      mock_name_from_base.assert_called_with("input")
  
imports: from __future__ import absolute_import
  import unittest
  from mock import Mock, patch
  from sagemaker.workflow.notebook_job_step import NotebookJobStep
  from sagemaker.workflow.functions import Join
label_desc: Use image node_id 12 for calling the TestNotebookJobStep obj's underlying member method code with example usage: obj.test_to_request_step_with_required_fields(mock_name_from_base, mock_execution_variables) without return types