class_docstr: A tf.TypeSpec for `AutoCompositeTensor` objects.
class_docstr_tok: ["A","tf.TypeSpec","for","`","AutoCompositeTensor","`","objects","."]
docstr: Returns True if `self` is subtype of `other`.
  
  Args:
    other: A `TypeSpec`.
docstr_tok: ["Returns","True","if","`","self","`","is","subtype","of","`","other","`",".","Args",":","other",":","A","`","TypeSpec","`","."]
code: def is_subtype_of(self, other):
      """Returns True if `self` is subtype of `other`.
  
      Args:
        other: A `TypeSpec`.
      """
      # pylint: disable=protected-access
      if (
          type(self) is not type(other)
          or self._callable_params != other._callable_params
      ):
          return False
  
      try:
          tf.nest.assert_same_structure(
              self._comparable[:-1], other._comparable[:-1]
          )
      except (TypeError, ValueError):
          return False
  
      self_elements = tf.nest.flatten(self._comparable[:-1])
      other_elements = tf.nest.flatten(other._comparable[:-1])
  
      def is_subtype_or_equal(a, b):
          try:
              return a.is_subtype_of(b)
          except AttributeError:
              return a == b
  
      return all(
          is_subtype_or_equal(self_element, other_element)
          for (self_element, other_element) in zip(
              self_elements, other_elements
          )
      )
  
imports: import contextlib
  import functools
  import threading
  import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import type_spec
  from tensorflow.python.framework import type_spec_registry
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.util import tf_inspect
  from tensorflow.python.util import variable_utils
label_desc: Use image node_id 8 for calling the _AutoCompositeTensorTypeSpec obj's underlying member method code with example usage: obj.is_subtype_of(other) and returns: all, False, False, a, unknown