code: def _decode_struct_value(
      struct_value: Optional[struct_pb2.Struct],
  ) -> JsonValueType:
      if struct_value is None:
          return None
      result = json_format.MessageToDict(struct_value)
      if _JSON_SINGLE_VALUE_KEY in result:
          return result[_JSON_SINGLE_VALUE_KEY]
      else:
          return result
  
imports: import builtins
  import copy
  import importlib
  import json
  from typing import Any, Dict, List, Optional, Type, Union
  from absl import logging
  from tfx.types import artifact_property
  from tfx.types.system_artifacts import SystemArtifact
  from tfx.utils import doc_controls
  from tfx.utils import json_utils
  from tfx.utils import proto_utils
  from google.protobuf import struct_pb2
  from google.protobuf import json_format
  from google.protobuf import message
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _decode_struct_value(struct_value) and returns: None, result, result