code: def get_parsed_value(
      value: metadata_store_pb2.Value,
      schema: Optional[pipeline_pb2.Value.Schema],
  ) -> types.ExecPropertyTypes:
      """Converts MLMD value into parsed (non-)primitive value."""
  
      def parse_value(
          value: str, value_type: pipeline_pb2.Value.Schema.ValueType
      ) -> types.ExecPropertyTypes:
          if value_type.HasField("list_type"):
              json_value = json_utils.loads(value)
              if not isinstance(json_value, list):
                  raise RuntimeError(
                      "Expect list type, got %r" % json_value
                  )
              return [
                  parse_value(val, value_type.list_type)
                  for val in json_value
              ]
          elif value_type.HasField("dict_type"):
              json_value = json_utils.loads(value)
              if not isinstance(json_value, dict):
                  raise RuntimeError(
                      "Expect dict type, got %r" % json_value
                  )
              return {
                  key: parse_value(val, value_type.dict_type)
                  for key, val in json_value.items()
              }
  
          elif value_type.HasField("proto_type"):
              return proto_utils.deserialize_proto_message(
                  value,
                  value_type.proto_type.message_type,
                  value_type.proto_type.file_descriptors,
              )
          else:
              return value
  
      if schema and value.HasField("string_value"):
          if schema.value_type.HasField("boolean_type"):
              return json_utils.loads(value.string_value)
          else:
              return parse_value(value.string_value, schema.value_type)
      else:
          return getattr(value, 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 7 for calling a global function with example usage: get_parsed_value(value, schema) and returns: getattr, unknown, json_utils, parse_value, unknown, proto_utils, value