code: def test_parse_type(self):
      def compare(expected, tf_type):
          attr = attr_value.AttrValue()
          attr.type = tf_type
          self.assertEqual(expected, parse.parse_attr(attr))
  
      compare(None, types.DataType.DT_INVALID)
      compare(mil_types.float, types.DataType.DT_FLOAT)
      compare(mil_types.double, types.DataType.DT_DOUBLE)
      compare(mil_types.int32, types.DataType.DT_INT32)
      compare(mil_types.uint8, types.DataType.DT_UINT8)
      compare(mil_types.int16, types.DataType.DT_INT16)
      compare(mil_types.int8, types.DataType.DT_INT8)
      compare(mil_types.int8, types.DataType.DT_INT8)
      compare(mil_types.str, types.DataType.DT_STRING)
      compare(None, types.DataType.DT_COMPLEX64)
      compare(mil_types.int64, types.DataType.DT_INT64)
      compare(mil_types.bool, types.DataType.DT_BOOL)
      compare(None, types.DataType.DT_QINT8)
      compare(None, types.DataType.DT_QUINT8)
      compare(None, types.DataType.DT_QINT32)
      compare(None, types.DataType.DT_BFLOAT16)
      compare(None, types.DataType.DT_QINT16)
      compare(None, types.DataType.DT_QUINT16)
      compare(mil_types.uint16, types.DataType.DT_UINT16)
      compare(None, types.DataType.DT_COMPLEX128)
      compare(None, types.DataType.DT_HALF)
      compare(None, types.DataType.DT_RESOURCE)
      compare(None, types.DataType.DT_VARIANT)
      compare(mil_types.uint32, types.DataType.DT_UINT32)
      compare(mil_types.uint64, types.DataType.DT_UINT64)
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/frontend/tensorflow/test/test_parse.py
imports: import unittest
  import pytest
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.framework import tensor_shape_pb2
  from tensorflow.core.framework import types_pb2
  from coremltools.converters.mil.mil import types
  import coremltools.converters.mil.frontend.tensorflow.parse
label_desc: Use image node_id 6 for calling the TestParse obj's underlying member method code with example usage: obj.test_parse_type() without return types