class_docstr: An auto-batching DSL context.
  
  Auto-batching DSL operations are methods on the `ProgramBuilder` object.  It's
  used like this:
  
  ```python
  ab = dsl.ProgramBuilder()
  
  def fib_type(arg_types):
    return arg_types[0]
  
  with ab.function(type_inference=fib_type) as fibonacci:
    n = ab.param('n')
    ab.var.cond = ab.primop(lambda n: n > 1)
    with ab.if_(ab.var.cond):
      ab.var.nm1 = ab.primop(lambda n: n - 1)
      ab.var.fibm1 = ab.call(fibonacci, [ab.var.nm1])
      ab.var.nm2 = ab.primop(lambda n: n - 2)
      ab.var.fibm2 = ab.call(fibonacci, [ab.var.nm2])
      ab.var.ans = ab.primop(lambda fibm1, fibm2: fibm1 + fibm2)
    with ab.else_():
      ab.var.ans = ab.const(1)
    ab.return_(ab.var.ans)
  
  prog = ab.program(main=fibonacci)
  # Now `prog` is a well-formed `instructions.Program`, and the context
  # `ab` is no longer needed.
  ```
  
  Note the sequence of method calls on `ProgramBuilder` corresponds to the
  source code of the `Program` being defined, not its runtime behavior.  This is
  because (a) functions are defined with a context manager (rather than a Python
  function) which executes its body immediately and exactly once; and (b)
  function call instructions (and primitive operations) are just recorded, not
  entered recursively.
docstr: Records the `false` branch of a conditional operation.
  
  The `true` branch must be recorded (by `if_`, above) as the immediately
  preceding operation at the same nesting depth.
  
  Example:
  ```python
  ab = dsl.ProgramBuilder()
  
  ab.var.false = ab.const(False)
  with ab.if_(ab.var.false):
    ...
  with ab.else_():
    ...  # The body of the `with` statement gives the `false` branch
  ```
  
  Args:
    else_name: Optional Python string naming the false branch when the program
      is printed.  Overrides the `else_name`, if any, given in the
      corresponding `if_`.
    continue_name: Optional Python string naming the continuation after the if
      when the program is printed.  Overrides the `continue_name`, if any,
      given in the corresponding `if_`.
  
  Raises:
    ValueError: If not immediately preceded by an `if_`.
  
  Yields:
    Nothing.
code: def else_(self, else_name=None, continue_name=None):
      """Records the `false` branch of a conditional operation.
  
      The `true` branch must be recorded (by `if_`, above) as the immediately
      preceding operation at the same nesting depth.
  
      Example:
      ```python
      ab = dsl.ProgramBuilder()
  
      ab.var.false = ab.const(False)
      with ab.if_(ab.var.false):
        ...
      with ab.else_():
        ...  # The body of the `with` statement gives the `false` branch
      ```
  
      Args:
        else_name: Optional Python string naming the false branch when the program
          is printed.  Overrides the `else_name`, if any, given in the
          corresponding `if_`.
        continue_name: Optional Python string naming the continuation after the if
          when the program is printed.  Overrides the `continue_name`, if any,
          given in the corresponding `if_`.
  
      Raises:
        ValueError: If not immediately preceded by an `if_`.
  
      Yields:
        Nothing.
      """
      if self._pending_after_else_block is None:
          msg = "Detected else block with no preceding if"
          raise ValueError(msg)
      if else_name is not None:
          self._blocks[-1].name = else_name
      if continue_name is not None:
          self._pending_after_else_block.name = continue_name
      # Save the pending block in case the coming else block contains an if
      pending_block = self._pending_after_else_block
      self._pending_after_else_block = None
      yield
      # In case the enclosed code ended in a dangling if, close it
      self._prepare_for_instruction()
      # Now close this else block
      self._append_block(pending_block)
  
imports: import collections
  import contextlib
  import inspect
  from tensorflow_probability.python.experimental.auto_batching import instructions
label_desc: Use image node_id 15 for calling the ProgramBuilder obj's underlying member method code with example usage: obj.else_(else_name, continue_name) without return types