code: def test_data_quality_monitor_update_failure(
      data_quality_monitor, sagemaker_session
  ):
      data_quality_monitor.create_monitoring_schedule(
          endpoint_input=ENDPOINT_NAME,
      )
      old_job_definition_name = data_quality_monitor.job_definition_name
      sagemaker_session.sagemaker_client.describe_data_quality_job_definition = Mock(
          return_value=copy.deepcopy(DATA_QUALITY_JOB_DEFINITION)
      )
      sagemaker_session.sagemaker_client.update_monitoring_schedule = (
          Mock(side_effect=ConnectionError("400"))
      )
      with pytest.raises(ConnectionError):
          data_quality_monitor.update_monitoring_schedule(
              max_runtime_in_seconds=NEW_MAX_RUNTIME_IN_SECONDS,
          )
      sagemaker_session.sagemaker_client.describe_data_quality_job_definition.assert_called_once_with(
          JobDefinitionName=old_job_definition_name
      )
      sagemaker_session.sagemaker_client.delete_data_quality_job_definition.assert_called_once()
      assert (
          sagemaker_session.sagemaker_client.delete_data_quality_job_definition.call_args[
              1
          ][
              "JobDefinitionName"
          ]
          != old_job_definition_name
      )
  
      # no effect
      data_quality_monitor.update_monitoring_schedule()
  
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 16 for calling a global function with example usage: test_data_quality_monitor_update_failure(data_quality_monitor, sagemaker_session) without return types