code: def test_parse_scalar(self):
      def compare(expected, val, field_name):
          a = attr_value.AttrValue()
          setattr(a, field_name, val)
          actual = parse.parse_attr(a)
          self.assertEqual(expected, actual)
  
      compare("a String", b"a String", "s")
      compare(55, 55, "i")
      compare(True, True, "b")
  
      attr = attr_value.AttrValue()
      attr.f = 12.3
      self.assertAlmostEqual(12.3, parse.parse_attr(attr), places=2)
  
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 2 for calling the TestParse obj's underlying member method code with example usage: obj.test_parse_scalar() without return types