class_docstr: A model of the expected behavior of a variable.
  
  The purpose of this model is to
  - Define, as simply as possible, the API and expected semantics of
    the Variable data structure.
  - Serve as a reference implementation for model-based testing
    of more sophisticated Variable data structures.
  
  Conceptually, a Variable is a batch of stacks, which admits masked
  reading and writing to the top element, and masked pushing and
  popping to save and restore previous writes. We model push as
  inserting an undefined value as the new top. This admits
  implementations that optimize push-pop sequences that do not have an
  interposing assignment.
  
  This model accepts and enforces a maximum stack depth, because I
  expect (some?) implementations that pre-allocate fixed-size arrays
  to hold their stacks.
  
  This model also chooses to require non-empty stacks, because that's
  convenient for the first implementation under test. It would have
  been equally valid to permit empty stacks, as long as they are not
  read from or written to before the next push.
docstr: Returns the top value of every stack.
  
  A `None` value at an index means that result is not defined. This
  can happen when a `push` is followed by a `read`, because the
  pushes are not specified to be duplicating.
  
  Returns:
    results: A list of length `batch_size`. Each element is either
      `None`, indicating "undefined", or an array of shape `[...]`.
code: def read(self):
      """Returns the top value of every stack.
  
      A `None` value at an index means that result is not defined. This
      can happen when a `push` is followed by a `read`, because the
      pushes are not specified to be duplicating.
  
      Returns:
        results: A list of length `batch_size`. Each element is either
          `None`, indicating "undefined", or an array of shape `[...]`.
      """
      for s in self._stacks:
          assert (
              s
          ), "Internal invariant violation: empty stack detected."
      return [s[-1] for s in self._stacks]
  
file_path: probability/tensorflow_probability/python/experimental/auto_batching/backend_test_lib.py
imports: from absl import logging
label_desc: Use image node_id 2 for calling the ModelVariable obj's underlying member method code with example usage: obj.read() and returns: unknown