code: def test_workflow_with_clarify(
      data_config,
      data_bias_config,
      model_config,
      model_predicted_label_config,
      pipeline_name,
      role,
      sagemaker_session,
  ):
      instance_type = ParameterString(
          name="InstanceType", default_value="ml.m5.xlarge"
      )
      instance_count = ParameterInteger(
          name="InstanceCount", default_value=1
      )
  
      analysis_config = data_config.get_config()
      analysis_config.update(data_bias_config.get_config())
      (
          probability_threshold,
          predictor_config,
      ) = model_predicted_label_config.get_predictor_config()
      predictor_config.update(model_config.get_predictor_config())
      analysis_config["methods"] = {
          "post_training_bias": {"methods": "all"}
      }
      analysis_config["predictor"] = predictor_config
      analysis_config["probability_threshold"] = probability_threshold
      analysis_config["methods"]["report"] = {
          "name": "report",
          "title": "Analysis Report",
      }
  
      with tempfile.TemporaryDirectory() as tmpdirname:
          analysis_config_file = os.path.join(
              tmpdirname, "analysis_config.json"
          )
          with open(analysis_config_file, "w") as f:
              json.dump(analysis_config, f)
          config_input = ProcessingInput(
              input_name="analysis_config",
              source=analysis_config_file,
              destination="/opt/ml/processing/input/config",
              s3_data_type="S3Prefix",
              s3_input_mode="File",
              s3_compression_type="None",
          )
  
          data_input = ProcessingInput(
              input_name="dataset",
              source=data_config.s3_data_input_path,
              destination="/opt/ml/processing/input/data",
              s3_data_type="S3Prefix",
              s3_input_mode="File",
              s3_data_distribution_type=data_config.s3_data_distribution_type,
              s3_compression_type=data_config.s3_compression_type,
          )
  
          result_output = ProcessingOutput(
              source="/opt/ml/processing/output",
              destination=data_config.s3_output_path,
              output_name="analysis_result",
              s3_upload_mode="EndOfJob",
          )
  
          processor = SageMakerClarifyProcessor(
              role="SageMakerRole",
              instance_count=instance_count,
              instance_type=instance_type,
              sagemaker_session=sagemaker_session,
          )
  
          property_file = PropertyFile(
              name="BiasOutput",
              output_name="analysis_result",
              path="analysis.json",
          )
  
          step_process = ProcessingStep(
              name="my-process",
              processor=processor,
              inputs=[data_input, config_input],
              outputs=[result_output],
              property_files=[property_file],
          )
  
          # Keep the deprecated JsonGet in test to verify it's compatible with new changes
          cond_left = JsonGet(
              step=step_process,
              property_file="BiasOutput",
              json_path="post_training_bias_metrics.facets.F1[0].metrics[0].value",
          )
  
          step_condition = ConditionStep(
              name="bias-condition",
              conditions=[
                  ConditionLessThanOrEqualTo(left=cond_left, right=1)
              ],
              if_steps=[],
              else_steps=[],
          )
  
          pipeline = Pipeline(
              name=pipeline_name,
              parameters=[instance_type, instance_count],
              steps=[step_process, step_condition],
              sagemaker_session=sagemaker_session,
          )
  
          try:
              response = pipeline.create(role)
              create_arn = response["PipelineArn"]
  
              execution = pipeline.start(parameters={})
  
              response = execution.describe()
              assert response["PipelineArn"] == create_arn
  
              wait_pipeline_execution(execution=execution)
              execution_steps = execution.list_steps()
  
              assert len(execution_steps) == 2
              assert execution_steps[1]["StepName"] == "my-process"
              assert execution_steps[1]["StepStatus"] == "Succeeded"
              assert execution_steps[0]["StepName"] == "bias-condition"
              assert execution_steps[0]["StepStatus"] == "Succeeded"
              assert (
                  execution_steps[0]["Metadata"]["Condition"]["Outcome"]
                  == "True"
              )
  
          finally:
              try:
                  pipeline.delete()
              except Exception:
                  pass
  
imports: from __future__ import absolute_import
  import json
  import os
  import statistics
  import time
  import tempfile
  import pytest
  import numpy
  import pandas
  from tests.integ.sagemaker.workflow.helpers import wait_pipeline_execution
  from sagemaker.amazon.linear_learner import LinearLearner, LinearLearnerPredictor
  from sagemaker.clarify import BiasConfig, DataConfig, ModelConfig, ModelPredictedLabelConfig, SageMakerClarifyProcessor
  from sagemaker.processing import ProcessingInput, ProcessingOutput
  from sagemaker.session import get_execution_role
  from sagemaker.workflow.conditions import ConditionLessThanOrEqualTo
  from sagemaker.workflow.condition_step import ConditionStep, JsonGet
  from sagemaker.workflow.parameters import ParameterInteger, ParameterString
  from sagemaker.workflow.steps import ProcessingStep
  from sagemaker.workflow.properties import PropertyFile
  from sagemaker.workflow.pipeline import Pipeline
  from sagemaker import utils
  from tests import integ
  from tests.integ import timeout
label_desc: Use image node_id 11 for calling a global function with example usage: test_workflow_with_clarify(data_config, data_bias_config, model_config, model_predicted_label_config, pipeline_name, role, sagemaker_session) without return types