code: def testConvertAttribute(self, attr_type, attr_val, expected):
      api_info = self.makeApiInfoFromParamSpecs(
          "ConvertAttributes", ["x"], {}, {"x": attr_type}
      )
      tensor_converter = self.makeTensorConverter()
  
      params = [attr_val]
      inferred = Convert(api_info, tensor_converter, params)
      self.assertEqual(inferred.types, [])
      self.assertEqual(inferred.type_lists, [])
      self.assertEqual(inferred.lengths, [])
      self.assertLen(params, 1)
      actual = params[0]
      self.assertEqual(actual, expected)
  
      # Check that we got the actual types we expected.  (Note that in Python,
      # two values may be equal even if they have different types.)
      self.assertIs(type(actual), type(expected))
      if isinstance(expected, list):
          self.assertLen(actual, len(expected))
          for actual_item, expected_item in zip(actual, expected):
              self.assertIs(type(actual_item), type(expected_item))
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.core.framework import types_pb2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import _pywrap_python_api_info
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework._pywrap_python_api_parameter_converter import Convert
  from tensorflow.python.framework._pywrap_python_tensor_converter import PythonTensorConverter
  from tensorflow.python.platform import googletest
  from tensorflow.python.util import nest
label_desc: Use image node_id 8 for calling the PythonAPIWrapperTest obj's underlying member method code with example usage: obj.testConvertAttribute(attr_type, attr_val, expected) without return types