code: def load_tfma_version(
      signature_def: tf.compat.v1.MetaGraphDef.SignatureDefEntry,
      graph: tf.Graph,
  ) -> types.TensorType:
      """Loads TFMA version information from signature_def.inputs.
  
      Args:
        signature_def: SignatureDef to lookup node in.
        graph: TensorFlow graph to lookup the node in.
  
      Returns:
        TFMA version tensor.
  
      Raises:
        ValueError: If version not found signature_def.inputs.
      """
      if (
          constants.SIGNATURE_DEF_TFMA_VERSION_KEY
          not in signature_def.inputs
      ):
          raise ValueError(
              "tfma version not found in signature_def: %s"
              % signature_def
          )
      return tf.compat.v1.saved_model.utils.get_tensor_from_tensor_info(
          signature_def.inputs[
              constants.SIGNATURE_DEF_TFMA_VERSION_KEY
          ],
          graph,
      )
  
imports: import collections
  from typing import Dict, List, Optional, Tuple, Union
  import tensorflow
  from tensorflow_model_analysis.api import types
  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 util
  from google.protobuf import any_pb2
  from tensorflow.core.protobuf import meta_graph_pb2
label_desc: Use image node_id 4 for calling a global function with example usage: load_tfma_version(signature_def, graph) and returns: tf