message: Document the fact that TypeSpec serializations may have `namedtuple`s replaced with ducktype-compatible types.
diff: @@ -295,7 +295,24 @@ class TypeSpec(object):
  @classmethod
  def _deserialize(cls, serialization):
  - """Reconstructs a TypeSpec from a value returned by `serialize`."""
  + """Reconstructs a TypeSpec from a value returned by `serialize`.
  +
  + Args:
  + serialization: A value returned by _serialize. In some contexts,
  + `namedtuple`s in `serialization` may not have the identical type
  + that was returned by `_serialize` (but its type will still be a
  + `namedtuple` type with the same type name and field names). For
  + example, the code that loads a SavedModel does not have access to
  + the original `namedtuple` type, so it dynamically creates a new
  + `namedtuple` type with the same type name and field names as the
  + original one. If necessary, you can check `serialization` for these
  + duck-typed `nametuple` types, and restore them to the original type.
  + (E.g., this would be necessary if you rely on type checks such as
  + `isinstance` for this `TypeSpec`'s member variables).
  +
  + Returns:
  + A `TypeSpec` of type `cls`.
  + """
  return cls(*serialization)
  # === Operators ===
  