code: def testDatasetSpecTraceType(self):
      trace_type_1 = dataset_ops.DatasetSpec(
          tensor_spec.TensorSpec(shape=(), dtype=dtypes.int32), [5]
      )
      trace_type_2 = dataset_ops.DatasetSpec(
          tensor_spec.TensorSpec(shape=(), dtype=dtypes.int32), [5]
      )
  
      self.assertEqual(trace_type_1, trace_type_2)
      self.assertEqual(hash(trace_type_1), hash(trace_type_2))
      self.assertTrue(trace_type_1.is_subtype_of(trace_type_2))
      self.assertTrue(trace_type_2.is_subtype_of(trace_type_1))
  
      trace_type_3 = dataset_ops.DatasetSpec(
          tensor_spec.TensorSpec(shape=(), dtype=dtypes.int32), [6]
      )
      self.assertNotEqual(trace_type_1, trace_type_3)
      self.assertFalse(trace_type_1.is_subtype_of(trace_type_3))
      self.assertFalse(trace_type_3.is_subtype_of(trace_type_1))
  
file_path: tensorflow/tensorflow/python/data/kernel_tests/dataset_spec_test.py
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the DatasetSpecTest obj's underlying member method code with example usage: obj.testDatasetSpecTraceType() without return types