code: def get_metadata_value(
      value: metadata_store_pb2.Value,
  ) -> Optional[types.Property]:
      """Gets the primitive type value of a metadata_store_pb2.Value instance.
  
      Args:
        value: A metadata_store_pb2.Value message.
  
      Returns:
        The primitive type value of metadata_store_pb2.Value instance if set, `None`
        otherwise.
      """
      which = value.WhichOneof("value")
      return None if which is None else getattr(value, which)
  
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 11 for calling a global function with example usage: get_metadata_value(value) and returns: unknown