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.
code: def __init__(self, max_stack_depth, stacks):
      self._max_stack_depth = max_stack_depth
      self._stacks = 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 1 to create a new ModelVariable object from inherited base classes: object with example: obj = ModelVariable(max_stack_depth, stacks)