code: def testConvert(self, attr_type, value, expected):
      result = _op_def_util.ConvertPyObjectToAttributeType(
          value, attr_type
      )
  
      # Check that we get the expected value(s).
      self.assertEqual(expected, result)
  
      # Check that we get the expected type(s).
      self.assertEqual(type(expected), type(result))
      if isinstance(result, list):
          for expected_item, result_item in zip(expected, result):
              self.assertEqual(type(expected_item), type(result_item))
  
file_path: tensorflow/tensorflow/python/framework/op_def_util_test.py
imports: from absl.testing import parameterized
  import numpy
  from google.protobuf import text_format
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.framework import tensor_pb2
  from tensorflow.core.framework import types_pb2
  from tensorflow.python.framework import _op_def_util
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling the OpDefUtilTest obj's underlying member method code with example usage: obj.testConvert(attr_type, value, expected) without return types