code: def _format_attribute_value(value):
      if (
          isinstance(value, dict)
          and "type" in value
          and "value" in value
          and value["type"] == "type"
      ):
          return _format_data_type(value["value"])
      if isinstance(value, str):
          return value
      if value is True:
          return "true"
      if value is False:
          return "false"
      raise NotImplementedError()
  
imports: import json
  import logging
  import os
  import google.protobuf
  from tensorflow.core.framework import api_def_pb2
  from tensorflow.core.framework import op_def_pb2
  from tensorflow.core.framework import types_pb2
label_desc: Use image node_id 16 for calling a global function with example usage: _format_attribute_value(value) and returns: _format_data_type, value, str, str