code: def _wait_for_first_execution_to_complete(monitor):
      for _ in retries(
          max_retry_count=30,
          exception_message_prefix="Waiting for first execution to reach terminal state",
          seconds_to_sleep=60,
      ):
          schedule_desc = monitor.describe_schedule()
          execution_summary = schedule_desc.get(
              "LastMonitoringExecutionSummary"
          )
  
          # Once there is an execution, we can break
          if execution_summary is not None:
              monitor.stop_monitoring_schedule()
              last_execution_status = execution_summary[
                  "MonitoringExecutionStatus"
              ]
  
              if last_execution_status not in ["Pending", "InProgess"]:
                  # to prevent delete as it takes sometime for schedule to update out of InProgress
                  time.sleep(120)
                  break
  
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 26 for calling a global function with example usage: _wait_for_first_execution_to_complete(monitor) without return types