class_docstr: Implements the TF backend ops for a PC auto-batching VM.
docstr: Implements while loops for TF backend.
docstr_tok: ["Implements","while","loops","for","TF","backend","."]
code: def while_loop(self, cond, body, loop_vars, name=None):
      """Implements while loops for TF backend."""
      with tf.name_scope("VM.while_loop"):
          if tf.executing_eagerly():
              # The reg. variable optimization (see create_variable) may change loop
              # structure across iterations, which now triggers an exception for eager
              # tf.while_loop.
              while cond(*loop_vars):
                  loop_vars = body(*loop_vars)
              return loop_vars
          with _control_flow_v2():
              return tf.while_loop(
                  cond=cond,
                  body=body,
                  loop_vars=loop_vars,
                  back_prop=False,
                  name=name,
                  parallel_iterations=self._while_parallel_iterations,
                  maximum_iterations=self._while_maximum_iterations,
              )
  
imports: import collections
  import contextlib
  import six
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.auto_batching import instructions
  from tensorflow_probability.python.experimental.auto_batching import xla
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow.python.ops import control_flow_util
label_desc: Use image node_id 18 for calling the TensorFlowBackend obj's underlying member method code with example usage: obj.while_loop(cond, body, loop_vars, name) and returns: loop_vars, tf