class_docstr: A tf.TypeSpec for `AutoCompositeTensor` objects.
class_docstr_tok: ["A","tf.TypeSpec","for","`","AutoCompositeTensor","`","objects","."]
code: def _deserialize(cls, encoded):
      version = encoded[0]
      if version == 1:
          encoded = encoded + ((),)
          version = 2
      if version == 2:
          encoded = encoded + ((),)
          version = 3
      if version != _AUTO_COMPOSITE_TENSOR_VERSION:
          raise ValueError(
              f"Expected version {_AUTO_COMPOSITE_TENSOR_VERSION},"
              f" but got {version}."
          )
      return cls(*encoded[1:])
  
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 7 for calling the _AutoCompositeTensorTypeSpec obj's underlying member method code with example usage: obj._deserialize(cls, encoded) and returns: cls