code: def test_pipeline_condition_step_interpolated(sagemaker_session):
      param1 = ParameterInteger(name="MyInt1")
      param2 = ParameterInteger(name="MyInt2")
      param3 = ParameterString(name="MyStr")
      var = ExecutionVariables.START_DATETIME
  
      step_0 = CustomStep(name="MyStep0")
  
      cond_eq = ConditionEquals(left=param1, right=param2)
      cond_gt = ConditionGreaterThan(left=var, right="2020-12-01")
      cond_gte = ConditionGreaterThanOrEqualTo(left=var, right=param3)
      cond_lt = ConditionLessThan(left=var, right="2020-12-01")
      cond_lte = ConditionLessThanOrEqualTo(left=var, right=param3)
      cond_in = ConditionIn(value=param3, in_values=["abc", "def"])
      cond_in_mixed = ConditionIn(
          value=param3,
          in_values=["abc", step_0.properties.TrainingJobName, var],
      )
      cond_not_eq = ConditionNot(expression=cond_eq)
      cond_not_in = ConditionNot(expression=cond_in)
      cond_or = ConditionOr(conditions=[cond_gt, cond_in])
  
      step1 = CustomStep(name="MyStep1")
      step2 = CustomStep(name="MyStep2")
      cond_step = ConditionStep(
          name="MyConditionStep",
          conditions=[
              cond_eq,
              cond_gt,
              cond_gte,
              cond_lt,
              cond_lte,
              cond_in,
              cond_in_mixed,
              cond_not_eq,
              cond_not_in,
              cond_or,
          ],
          if_steps=[step1],
          else_steps=[step2],
      )
  
      pipeline = Pipeline(
          name="MyPipeline",
          parameters=[param1, param2, param3],
          steps=[cond_step],
          sagemaker_session=sagemaker_session,
      )
      assert json.loads(pipeline.definition()) == {
          "Version": "2020-12-01",
          "Metadata": {},
          "Parameters": [
              {"Name": "MyInt1", "Type": "Integer"},
              {"Name": "MyInt2", "Type": "Integer"},
              {"Name": "MyStr", "Type": "String"},
          ],
          "PipelineExperimentConfig": {
              "ExperimentName": {"Get": "Execution.PipelineName"},
              "TrialName": {"Get": "Execution.PipelineExecutionId"},
          },
          "Steps": [
              {
                  "Name": "MyConditionStep",
                  "Type": "Condition",
                  "Arguments": {
                      "Conditions": [
                          {
                              "Type": "Equals",
                              "LeftValue": {"Get": "Parameters.MyInt1"},
                              "RightValue": {
                                  "Get": "Parameters.MyInt2"
                              },
                          },
                          {
                              "Type": "GreaterThan",
                              "LeftValue": {
                                  "Get": "Execution.StartDateTime"
                              },
                              "RightValue": "2020-12-01",
                          },
                          {
                              "Type": "GreaterThanOrEqualTo",
                              "LeftValue": {
                                  "Get": "Execution.StartDateTime"
                              },
                              "RightValue": {"Get": "Parameters.MyStr"},
                          },
                          {
                              "Type": "LessThan",
                              "LeftValue": {
                                  "Get": "Execution.StartDateTime"
                              },
                              "RightValue": "2020-12-01",
                          },
                          {
                              "Type": "LessThanOrEqualTo",
                              "LeftValue": {
                                  "Get": "Execution.StartDateTime"
                              },
                              "RightValue": {"Get": "Parameters.MyStr"},
                          },
                          {
                              "Type": "In",
                              "QueryValue": {"Get": "Parameters.MyStr"},
                              "Values": ["abc", "def"],
                          },
                          {
                              "Type": "In",
                              "QueryValue": {"Get": "Parameters.MyStr"},
                              "Values": [
                                  "abc",
                                  {
                                      "Get": "Steps.MyStep0.TrainingJobName"
                                  },
                                  {"Get": "Execution.StartDateTime"},
                              ],
                          },
                          {
                              "Type": "Not",
                              "Condition": {
                                  "Type": "Equals",
                                  "LeftValue": {
                                      "Get": "Parameters.MyInt1"
                                  },
                                  "RightValue": {
                                      "Get": "Parameters.MyInt2"
                                  },
                              },
                          },
                          {
                              "Type": "Not",
                              "Condition": {
                                  "Type": "In",
                                  "QueryValue": {
                                      "Get": "Parameters.MyStr"
                                  },
                                  "Values": ["abc", "def"],
                              },
                          },
                          {
                              "Type": "Or",
                              "Conditions": [
                                  {
                                      "Type": "GreaterThan",
                                      "LeftValue": {
                                          "Get": "Execution.StartDateTime"
                                      },
                                      "RightValue": "2020-12-01",
                                  },
                                  {
                                      "Type": "In",
                                      "QueryValue": {
                                          "Get": "Parameters.MyStr"
                                      },
                                      "Values": ["abc", "def"],
                                  },
                              ],
                          },
                      ],
                      "IfSteps": [
                          {
                              "Name": "MyStep1",
                              "Type": "Training",
                              "Arguments": {},
                          }
                      ],
                      "ElseSteps": [
                          {
                              "Name": "MyStep2",
                              "Type": "Training",
                              "Arguments": {},
                          }
                      ],
                  },
              },
              {
                  "Name": "MyStep0",
                  "Type": "Training",
                  "Arguments": {},
              },
          ],
      }
  
imports: from __future__ import absolute_import
  import json
  from sagemaker.remote_function.job import _JobSettings
  from sagemaker.workflow.conditions import ConditionEquals, ConditionGreaterThan, ConditionGreaterThanOrEqualTo, ConditionIn, ConditionLessThan, ConditionLessThanOrEqualTo, ConditionNot, ConditionOr
  from sagemaker.workflow.execution_variables import ExecutionVariables
  from sagemaker.workflow.function_step import step
  from sagemaker.workflow.parameters import ParameterInteger, ParameterString
  from sagemaker.workflow.condition_step import ConditionStep
  from sagemaker.workflow.pipeline import Pipeline, PipelineGraph
  from tests.unit.sagemaker.workflow.helpers import CustomStep, ordered
label_desc: Use image node_id 3 for calling a global function with example usage: test_pipeline_condition_step_interpolated(sagemaker_session) without return types