code: def get_value(tfx_value: pipeline_pb2.Value) -> types.Property:
      """Gets the primitive type value of a pipeline_pb2.Value instance.
  
      Args:
        tfx_value: A pipeline_pb2.Value message.
  
      Returns:
        The primitive type value of the tfx value.
  
      Raises:
        RuntimeError: when the value is still in RuntimeParameter form.
      """
      which = tfx_value.WhichOneof("value")
      if which != "field_value":
          raise RuntimeError(
              "Expecting field_value but got %s." % tfx_value
          )
  
      return getattr(
          tfx_value.field_value,
          tfx_value.field_value.WhichOneof("value"),
      )
  
imports: from typing import Dict, Iterable, List, Mapping, Optional
  from tfx import types
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import artifact_utils
  from tfx.utils import json_utils
  from tfx.utils import proto_utils
  from google.protobuf import message
  from ml_metadata.proto import metadata_store_pb2
  from ml_metadata.proto import metadata_store_service_pb2
label_desc: Use image node_id 10 for calling a global function with example usage: get_value(tfx_value) and returns: getattr