code: def test_one_time_bias_monitor(
      bias_monitor, sagemaker_session, bias_config
  ):
      monitor_schedule_name = utils.unique_name_from_base(
          "bias-monitor"
      )
      ground_truth_input = os.path.join(
          "s3://",
          sagemaker_session.default_bucket(),
          "sagemaker-serving-batch-transform",
          "IntegTestGroundtruth",
      )
      bias_analysis_config = BiasAnalysisConfig(
          bias_config, headers=ALL_HEADERS, label=HEADER_OF_LABEL
      )
      s3_uri_monitoring_output = os.path.join(
          "s3://",
          sagemaker_session.default_bucket(),
          "sagemaker-serving-batch-transform",
          monitor_schedule_name,
          "monitor_output",
      )
      # To include probability threshold
      data_captured_destination_s3_uri = os.path.join(
          "s3://",
          sagemaker_session.default_bucket(),
          "sagemaker-serving-batch-transform",
          str(uuid.uuid4()),
      )
  
      batch_transform_input = BatchTransformInput(
          data_captured_destination_s3_uri=data_captured_destination_s3_uri,
          destination="/opt/ml/processing/output",
          dataset_format=MonitoringDatasetFormat.csv(header=False),
          probability_threshold_attribute=BIAS_PROBABILITY_THRESHOLD,
      )
  
      start = datetime.now()
  
      bias_monitor.create_monitoring_schedule(
          monitor_schedule_name=monitor_schedule_name,
          analysis_config=bias_analysis_config,
          batch_transform_input=batch_transform_input,
          ground_truth_input=ground_truth_input,
          output_s3_uri=s3_uri_monitoring_output,
          schedule_cron_expression=CronExpressionGenerator.now(),
          data_analysis_start_time=START_TIME_OFFSET,
          data_analysis_end_time=END_TIME_OFFSET,
      )
  
      try:
          _wait_for_first_execution_to_start(monitor=bias_monitor)
  
          # storing the start time as soon as an execution starts
          end = datetime.now()
  
          _wait_for_first_execution_to_complete(monitor=bias_monitor)
          bias_monitor.stop_monitoring_schedule()
          bias_monitor.delete_monitoring_schedule()
  
          # the execution should start within 30 minutes
          assert (end - start).total_seconds() < 30 * 60
  
      except Exception as e:
          bias_monitor.stop_monitoring_schedule()
          bias_monitor.delete_monitoring_schedule()
          raise e
  
imports: from __future__ import print_function, absolute_import
  from datetime import datetime, timedelta
  import json
  import numpy
  import os
  import pandas
  import pytest
  import tempfile
  import uuid
  import time
  import tests.integ
  import tests.integ.timeout
  from sagemaker import image_uris, utils
  from sagemaker.model_monitor import BiasAnalysisConfig, CronExpressionGenerator, DataCaptureConfig, EndpointInput, ExplainabilityAnalysisConfig, ModelBiasMonitor, ModelExplainabilityMonitor, BatchTransformInput, MonitoringDatasetFormat
  from sagemaker.s3 import S3Uploader
  from sagemaker.utils import unique_name_from_base
  from sagemaker.clarify import BiasConfig, DataConfig, ModelConfig, ModelPredictedLabelConfig, SHAPConfig
  from sagemaker.model import Model
  from tests.integ import DATA_DIR
  from tests.integ.retry import retries
label_desc: Use image node_id 12 for calling a global function with example usage: test_one_time_bias_monitor(bias_monitor, sagemaker_session, bias_config) without return types