code: def test_evaluation_details_autodiscovery_from_model_package_details(
      session, model_package_example, caplog
  ):
      with open(CLARIFY_BIAS_JSON_PATH, "r", encoding="utf-8") as istr:
          data = json.dumps(json.load(istr))
          response = {
              "Body": botocore.response.StreamingBody(
                  io.BytesIO(bytes(data, "utf-8")),
                  content_length=len(data),
              ),
              "ContentType": "application/json",
          }
      session.boto_session.client.return_value.get_object.side_effect = [
          response,
      ]
  
      with caplog.at_level(logging.INFO):
          evaluation_details = (
              model_package_example.discover_evaluation_details(
                  sagemaker_session=session
              )
          )
          assert (
              "Evaluation details auto-discovery was unsuccessful. "
              "ModelMetrics was not found in the given model package. "
              "Please create one from scratch with EvaluationJob."
          ) in caplog.text
  
      model_package_example.model_metrics = MODEL_METRICS
      evaluation_details = (
          model_package_example.discover_evaluation_details(
              sagemaker_session=session
          )
      )
  
      assert len(evaluation_details[0].metric_groups) == 3
  
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 32 for calling a global function with example usage: test_evaluation_details_autodiscovery_from_model_package_details(session, model_package_example, caplog) without return types