class_docstr: Make prediction requests to an Amazon SageMaker endpoint.
class_docstr_tok: ["Make","prediction","requests","to","an","Amazon","SageMaker","endpoint","."]
docstr: Decide which ModelMonitor class the given schedule should attach to
  
  Args:
      schedule_name (str): The schedule to be attached.
      monitoring_type (str): The monitoring type of the schedule
  
  Returns:
      sagemaker.model_monitor.ModelMonitor: ModelMonitor or a subclass of ModelMonitor.
  
  Raises:
      TypeError: If the class could not be decided (due to unknown monitoring type).
docstr_tok: ["Decide","which","ModelMonitor","class","the","given","schedule","should","attach","to","Args",":","schedule_name","(","str",")",":","The","schedule","to","be","attached",".","monitoring_type","(","str",")",":","The","monitoring","type","of","the","schedule","Returns",":","sagemaker.model_monitor.ModelMonitor",":","ModelMonitor","or","a","subclass","of","ModelMonitor",".","Raises",":","TypeError",":","If","the","class","could","not","be","decided","(","due","to","unknown","monitoring","type",")","."]
code: def _get_model_monitor_class(self, schedule_name, monitoring_type):
      """Decide which ModelMonitor class the given schedule should attach to
  
      Args:
          schedule_name (str): The schedule to be attached.
          monitoring_type (str): The monitoring type of the schedule
  
      Returns:
          sagemaker.model_monitor.ModelMonitor: ModelMonitor or a subclass of ModelMonitor.
  
      Raises:
          TypeError: If the class could not be decided (due to unknown monitoring type).
      """
      if monitoring_type == "ModelBias":
          clazz = ModelBiasMonitor
      elif monitoring_type == "ModelExplainability":
          clazz = ModelExplainabilityMonitor
      else:
          schedule = (
              self.sagemaker_session.describe_monitoring_schedule(
                  monitoring_schedule_name=schedule_name
              )
          )
          embedded_job_definition = schedule[
              "MonitoringScheduleConfig"
          ].get("MonitoringJobDefinition")
          if embedded_job_definition is not None:  # legacy v1 schedule
              image_uri = embedded_job_definition[
                  "MonitoringAppSpecification"
              ]["ImageUri"]
              if image_uri.endswith(DEFAULT_REPOSITORY_NAME):
                  clazz = DefaultModelMonitor
              else:
                  clazz = ModelMonitor
          elif monitoring_type == "DataQuality":
              clazz = DefaultModelMonitor
          elif monitoring_type == "ModelQuality":
              clazz = ModelQualityMonitor
          else:
              raise TypeError(
                  "Unknown monitoring type: {}".format(monitoring_type)
              )
      return clazz
  
imports: from __future__ import print_function, absolute_import
  import abc
  import datetime
  from typing import Any, Dict, Optional, Tuple, Union
  import logging
  from sagemaker.enums import EndpointType
  from sagemaker.deprecations import deprecated_class, deprecated_deserialize, deprecated_serialize, removed_kwargs, renamed_kwargs, renamed_warning
  from sagemaker.deserializers import BytesDeserializer, CSVDeserializer, JSONDeserializer, NumpyDeserializer, StreamDeserializer, StringDeserializer
  from sagemaker.jumpstart.payload_utils import PayloadSerializer
  from sagemaker.jumpstart.types import JumpStartSerializablePayload
  from sagemaker.jumpstart.utils import get_jumpstart_content_bucket
  from sagemaker.model_monitor import DataCaptureConfig, DefaultModelMonitor, ModelBiasMonitor, ModelExplainabilityMonitor, ModelMonitor, ModelQualityMonitor
  from sagemaker.serializers import CSVSerializer, IdentitySerializer, JSONSerializer, NumpySerializer
  from sagemaker.session import production_variant, Session
  from sagemaker.utils import name_from_base, stringify_object, format_tags
  from sagemaker.model_monitor.model_monitoring import DEFAULT_REPOSITORY_NAME
  from sagemaker.lineage.context import EndpointContext
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
label_desc: Use image node_id 16 for calling the Predictor obj's underlying member method code with example usage: obj._get_model_monitor_class(schedule_name, monitoring_type) and returns: clazz