class_docstr: Check job config for QualityCheckStep and ClarifyCheckStep.
docstr: Generates a ModelMonitor object
  
  Generates a ModelMonitor object with required config attributes for
      QualityCheckStep and ClarifyCheckStep
  
  Args:
      mm_type (str): The subclass type of ModelMonitor object.
          A valid mm_type should be one of the following: "DefaultModelMonitor",
          "ModelQualityMonitor", "ModelBiasMonitor", "ModelExplainabilityMonitor"
  
  Return:
      sagemaker.model_monitor.ModelMonitor or None if the mm_type is not valid
docstr_tok: ["Generates","a","ModelMonitor","object","Generates","a","ModelMonitor","object","with","required","config","attributes","for","QualityCheckStep","and","ClarifyCheckStep","Args",":","mm_type","(","str",")",":","The","subclass","type","of","ModelMonitor","object",".","A","valid","mm_type","should","be","one","of","the","following",":","``","DefaultModelMonitor","''",",","``","ModelQualityMonitor","''",",","``","ModelBiasMonitor","''",",","``","ModelExplainabilityMonitor","''","Return",":","sagemaker.model_monitor.ModelMonitor","or","None","if","the","mm_type","is","not","valid"]
code: def _generate_model_monitor(
      self, mm_type: str
  ) -> Optional[ModelMonitor]:
      """Generates a ModelMonitor object
  
      Generates a ModelMonitor object with required config attributes for
          QualityCheckStep and ClarifyCheckStep
  
      Args:
          mm_type (str): The subclass type of ModelMonitor object.
              A valid mm_type should be one of the following: "DefaultModelMonitor",
              "ModelQualityMonitor", "ModelBiasMonitor", "ModelExplainabilityMonitor"
  
      Return:
          sagemaker.model_monitor.ModelMonitor or None if the mm_type is not valid
  
      """
      if mm_type == "DefaultModelMonitor":
          monitor = DefaultModelMonitor(
              role=self.role,
              instance_count=self.instance_count,
              instance_type=self.instance_type,
              volume_size_in_gb=self.volume_size_in_gb,
              volume_kms_key=self.volume_kms_key,
              output_kms_key=self.output_kms_key,
              max_runtime_in_seconds=self.max_runtime_in_seconds,
              base_job_name=self.base_job_name,
              sagemaker_session=self.sagemaker_session,
              env=self.env,
              tags=self.tags,
              network_config=self.network_config,
          )
      elif mm_type == "ModelQualityMonitor":
          monitor = ModelQualityMonitor(
              role=self.role,
              instance_count=self.instance_count,
              instance_type=self.instance_type,
              volume_size_in_gb=self.volume_size_in_gb,
              volume_kms_key=self.volume_kms_key,
              output_kms_key=self.output_kms_key,
              max_runtime_in_seconds=self.max_runtime_in_seconds,
              base_job_name=self.base_job_name,
              sagemaker_session=self.sagemaker_session,
              env=self.env,
              tags=self.tags,
              network_config=self.network_config,
          )
      elif mm_type == "ModelBiasMonitor":
          monitor = ModelBiasMonitor(
              role=self.role,
              instance_count=self.instance_count,
              instance_type=self.instance_type,
              volume_size_in_gb=self.volume_size_in_gb,
              volume_kms_key=self.volume_kms_key,
              output_kms_key=self.output_kms_key,
              max_runtime_in_seconds=self.max_runtime_in_seconds,
              base_job_name=self.base_job_name,
              sagemaker_session=self.sagemaker_session,
              env=self.env,
              tags=self.tags,
              network_config=self.network_config,
          )
      elif mm_type == "ModelExplainabilityMonitor":
          monitor = ModelExplainabilityMonitor(
              role=self.role,
              instance_count=self.instance_count,
              instance_type=self.instance_type,
              volume_size_in_gb=self.volume_size_in_gb,
              volume_kms_key=self.volume_kms_key,
              output_kms_key=self.output_kms_key,
              max_runtime_in_seconds=self.max_runtime_in_seconds,
              base_job_name=self.base_job_name,
              sagemaker_session=self.sagemaker_session,
              env=self.env,
              tags=self.tags,
              network_config=self.network_config,
          )
      else:
          logging.warning(
              'Expected model monitor types: "DefaultModelMonitor", "ModelQualityMonitor", '
              '"ModelBiasMonitor", "ModelExplainabilityMonitor"'
          )
          return None
      return monitor
  
file_path: sagemaker-python-sdk/src/sagemaker/workflow/check_job_config.py
imports: from __future__ import absolute_import
  import logging
  from typing import Optional
  from sagemaker import Session
  from sagemaker.model_monitor import ModelMonitor, DefaultModelMonitor, ModelQualityMonitor, ModelBiasMonitor, ModelExplainabilityMonitor
  from sagemaker.utils import format_tags
label_desc: Use image node_id 2 for calling the CheckJobConfig obj's underlying member method code with example usage: obj._generate_model_monitor(mm_type) and returns: monitor, None