code: def testDatasetSpecHierarchicalDict(self):
      spec_1 = dataset_ops.DatasetSpec(
          {
              "a": tensor_spec.TensorSpec(
                  shape=(1, None), dtype=dtypes.int32
              )
          },
          [],
      )
      spec_2 = dataset_ops.DatasetSpec(
          {
              "a": tensor_spec.TensorSpec(
                  shape=(None, None), dtype=dtypes.int32
              )
          },
          [],
      )
      spec_3 = dataset_ops.DatasetSpec(
          {
              "b": tensor_spec.TensorSpec(
                  shape=(1, None), dtype=dtypes.int32
              )
          },
          [],
      )
      spec_4 = dataset_ops.DatasetSpec({"b": None}, [])
  
      self.assertTrue(spec_1.is_subtype_of(spec_1))
      self.assertTrue(spec_1.is_subtype_of(spec_2))
      self.assertFalse(spec_2.is_subtype_of(spec_1))
  
      self.assertFalse(spec_1.is_subtype_of(spec_3))
      self.assertFalse(spec_3.is_subtype_of(spec_1))
      self.assertFalse(spec_2.is_subtype_of(spec_3))
      self.assertFalse(spec_3.is_subtype_of(spec_2))
  
      self.assertTrue(spec_4.is_subtype_of(spec_4))
      self.assertEqual(
          spec_4.most_specific_common_supertype([]), spec_4
      )
      self.assertEqual(
          spec_4.most_specific_common_supertype([spec_4]), spec_4
      )
  
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 5 for calling the DatasetSpecTest obj's underlying member method code with example usage: obj.testDatasetSpecHierarchicalDict() without return types