code: def testAllTypesConvertibleToDType(self):
      for datatype_enum in types_pb2.DataType.values():
          if datatype_enum == types_pb2.DT_INVALID:
              continue
          dt = dtypes.as_dtype(datatype_enum)
          self.assertEqual(datatype_enum, dt.as_datatype_enum)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import _dtypes
  from tensorflow.core.framework import types_pb2
  from tensorflow.core.function import trace_type
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 2 for calling the TypesTest obj's underlying member method code with example usage: obj.testAllTypesConvertibleToDType() without return types