class_docstr: Abstraction for using a EvalSavedModel.
  
  Note that this class overrides eval_metrics_graph.EvalMetricsGraph
  which contains most of the functionality for handling the metric ops.
  In the eval saved model path, a common graph is shared between generation
  FeaturesPredictionLabels through Predict and doing the metric ops.
  The specific methods of this class constructs the graph and handles
  the prediction ops.
code: def _legacy_check_version(
      self, meta_graph_def: meta_graph_pb2.MetaGraphDef
  ):
      version = meta_graph_def.collection_def.get(
          encoding.TFMA_VERSION_COLLECTION
      )
      if version is None:
          raise ValueError(
              "could not find TFMA version in graph (at path %s)"
              % self._path
          )
  
imports: from typing import Any, Dict, Generator, List, NamedTuple, Optional, Tuple, Union
  import numpy
  import tensorflow
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.eval_metrics_graph import eval_metrics_graph
  from tensorflow_model_analysis.eval_saved_model import constants
  from tensorflow_model_analysis.eval_saved_model import encoding
  from tensorflow_model_analysis.eval_saved_model import graph_ref
  from tensorflow_model_analysis.eval_saved_model import util
  from tensorflow.core.protobuf import meta_graph_pb2
label_desc: Use image node_id 3 for calling the EvalSavedModel obj's underlying member method code with example usage: obj._legacy_check_version(meta_graph_def) without return types