code: def get_metadata_value_type(
      value: types.ExecPropertyTypes,
  ) -> metadata_store_pb2.PropertyType:
      """Gets the metadata property type of a property value from a value.
  
      Args:
        value: The property value represented by pipeline_pb2.Value or a primitive
          property value type.
  
      Returns:
        A metadata_store_pb2.PropertyType.
  
      Raises:
        RuntimeError: If property value is still in RuntimeParameter form
        ValueError: The value type is not supported.
      """
      if isinstance(value, int):
          return metadata_store_pb2.INT
      elif isinstance(value, float):
          return metadata_store_pb2.DOUBLE
      elif isinstance(value, pipeline_pb2.Value):
          which = value.WhichOneof("value")
          if which != "field_value":
              raise RuntimeError(
                  "Expecting field_value but got %s." % value
              )
  
          value_type = value.field_value.WhichOneof("value")
          if value_type == "int_value":
              return metadata_store_pb2.INT
          elif value_type == "double_value":
              return metadata_store_pb2.DOUBLE
          elif value_type == "string_value":
              return metadata_store_pb2.STRING
          elif value_type == "proto_value":
              return metadata_store_pb2.PROTO
          else:
              raise ValueError("Unexpected value type %s" % value_type)
      elif isinstance(value, (str, bool, message.Message, list, dict)):
          return metadata_store_pb2.STRING
      else:
          raise ValueError("Unexpected value type %s" % type(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 9 for calling a global function with example usage: get_metadata_value_type(value) and returns: metadata_store_pb2, metadata_store_pb2, metadata_store_pb2, metadata_store_pb2, metadata_store_pb2, metadata_store_pb2, metadata_store_pb2