code: def test_model_quality_monitor_created_by_attach(sagemaker_session):
      # attach and validate
      sagemaker_session.sagemaker_client.describe_model_quality_job_definition = (
          MagicMock()
      )
      model_quality_monitor = _test_model_quality_monitor_created_by_attach(
          sagemaker_session=sagemaker_session,
          model_monitor_cls=ModelQualityMonitor,
          describe_job_definition=sagemaker_session.sagemaker_client.describe_model_quality_job_definition,
      )
  
      # update schedule
      _test_model_quality_monitor_update_schedule(
          model_quality_monitor=model_quality_monitor,
          sagemaker_session=sagemaker_session,
      )
  
      # delete schedule
      _test_model_quality_monitor_delete_schedule(
          model_quality_monitor=model_quality_monitor,
          sagemaker_session=sagemaker_session,
      )
  
imports: from __future__ import absolute_import
  import copy
  import time
  from typing import Union
  import sagemaker
  import pytest
  from mock import Mock, patch, MagicMock
  from sagemaker.model_monitor import ModelMonitor, Constraints, CronExpressionGenerator, DefaultModelMonitor, EndpointInput, BatchTransformInput, ModelQualityMonitor, Statistics, MonitoringOutput, DataQualityMonitoringConfig, DataQualityDistributionConstraints
  from sagemaker.model_monitor.monitoring_alert import MonitoringAlertSummary, MonitoringAlertHistorySummary, MonitoringAlertActions, ModelDashboardIndicatorAction
  from sagemaker.network import NetworkConfig
  from sagemaker.model_monitor.dataset_format import MonitoringDatasetFormat, DatasetFormat
  from tests.unit import SAGEMAKER_CONFIG_MONITORING_SCHEDULE
label_desc: Use image node_id 29 for calling a global function with example usage: test_model_quality_monitor_created_by_attach(sagemaker_session) without return types