code: def get_metrics_artifacts_for_model(
      store: mlmd.MetadataStore,
      model_id: int,
      pipeline_types: Optional[PipelineTypes] = None,
  ) -> List[metadata_store_pb2.Artifact]:
      """Gets a list of evaluation artifacts from a model artifact.
  
      It looks for the evaluator component runs that take the given model as input.
      Then it returns the metrics artifact of that component run.
  
      Args:
        store: A ml-metadata MetadataStore to look for evaluation metrics.
        model_id: The id for the model artifact in the `store`.
        pipeline_types: An optional set of types if the `store` uses custom types.
  
      Returns:
        A list of metrics artifacts produced by the Evaluator component runs
        which take the given model artifact as the input.
  
      Raises:
        ValueError: If the `model_id` cannot be resolved as a model artifact in the
          given `store`.
      """
      if not pipeline_types:
          pipeline_types = _get_tfx_pipeline_types(store)
      _validate_model_id(store, pipeline_types.model_type, model_id)
      return _get_one_hop_artifacts(
          store,
          [model_id],
          _Direction.SUCCESSOR,
          pipeline_types.metrics_type,
      )
  
imports: import enum
  import os
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Union
  import attr
  import ml_metadata
  import tensorflow
  import tensorflow_model_analysis
  from absl import logging
  from ml_metadata.proto import metadata_store_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
  from model_card_toolkit import model_card
label_desc: Use image node_id 5 for calling a global function with example usage: get_metrics_artifacts_for_model(store, model_id, pipeline_types) and returns: _get_one_hop_artifacts