code: def test_training_details_autodiscovery_from_model_overview_autopilot(
      session, model_overview_example, caplog
  ):
      session.sagemaker_client.search.side_effect = [
          SEARCH_TRAINING_JOB_AUTOPILOT_EXAMPLE,
      ]
  
      model_overview_example.model_artifact = [MODEL_ARTIFACT[0]]
      training_details = TrainingDetails.from_model_overview(
          model_overview=model_overview_example,
          sagemaker_session=session,
      )
  
      # MetricDefinitions is empty
      assert (
          len(training_details.training_job_details.training_metrics)
          == 0
      )
      # HyperParameters have 3 keys
      assert (
          len(training_details.training_job_details.hyper_parameters)
          == 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 33 for calling a global function with example usage: test_training_details_autodiscovery_from_model_overview_autopilot(session, model_overview_example, caplog) without return types