code: def test_metrics_model_monitor_model_quality_regression():
      with open(
          os.path.join(
              DATA_DIR,
              "evaluation_metrics/model_monitor_model_quality_regression.json",
          ),
          "r",
          encoding="utf-8",
      ) as istr:
          json_data = json.load(istr)
  
      with open(
          os.path.join(
              DATA_DIR,
              "evaluation_metrics/translated_model_monitor_model_quality_regression.json",
          ),
          "r",
          encoding="utf-8",
      ) as istr:
          expected_translation = json.load(istr)
  
      parser = EVALUATION_METRIC_PARSERS[
          EvaluationMetricTypeEnum.MODEL_MONITOR_MODEL_QUALITY
      ]
      result = parser.run(json_data)
  
      assert json.dumps(result, sort_keys=True) == json.dumps(
          expected_translation, sort_keys=True
      )
  
imports: from __future__ import absolute_import
  import io
  import os
  import json
  import datetime
  import re
  import logging
  import pytest
  from mock import patch, Mock
  from botocore.exceptions import ClientError
  import botocore.response
  from sagemaker.model_card import schema_constraints
  from sagemaker.model_card import Environment, ModelOverview, IntendedUses, BusinessDetails, ObjectiveFunction, TrainingMetric, HyperParameter, Metric, TrainingDetails, MetricGroup, EvaluationJob, AdditionalInformation, ModelCard, Function, TrainingJobDetails, ModelPackage
  from sagemaker.model_card.model_card import ModelCardExportJob, ModelPackageCreator, SourceAlgorithm, Container, InferenceSpecification
  from sagemaker.model_card.helpers import _MaxSizeArray, _IsList, _OneOf, _IsModelCardObject, _JSONEncoder, _hash_content_str, _DefaultToRequestDict, _SkipEncodingDecoding
  from sagemaker.model_card.evaluation_metric_parsers import EvaluationMetricTypeEnum, EVALUATION_METRIC_PARSERS
label_desc: Use image node_id 43 for calling a global function with example usage: test_metrics_model_monitor_model_quality_regression() without return types