code: def set_metadata_value(
      metadata_value: metadata_store_pb2.Value,
      value: types.ExecPropertyTypes,
  ) -> metadata_store_pb2.Value:
      """Sets metadata property based on tfx value.
  
      Args:
        metadata_value: A metadata_store_pb2.Value message to be set.
        value: The value of the property in pipeline_pb2.Value form.
  
      Returns:
        A Value proto filled with the provided value.
  
      Raises:
        ValueError: If value type is not supported or is still RuntimeParameter.
      """
      parameter_value = pipeline_pb2.Value()
      set_parameter_value(parameter_value, value, set_schema=False)
      metadata_value.CopyFrom(parameter_value.field_value)
      return metadata_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 12 for calling a global function with example usage: set_metadata_value(metadata_value, value) and returns: metadata_value