class_docstr: Batch of environments inside the TensorFlow graph.
  
  The batch of environments will be stepped and reset inside of the graph using
  a tf.py_func(). The current batch of observations, actions, rewards, and done
  flags are held in according variables.
docstr: Reset the batch of environments.
  
  Args:
    indices: The batch indices of the environments to reset; defaults to all.
  
  Returns:
    Batch tensor of the new observations.
docstr_tok: ["Reset","the","batch","of","environments",".","Args",":","indices",":","The","batch","indices","of","the","environments","to","reset",";","defaults","to","all",".","Returns",":","Batch","tensor","of","the","new","observations","."]
code: def _reset_non_empty(self, indices):
      """Reset the batch of environments.
  
      Args:
        indices: The batch indices of the environments to reset; defaults to all.
  
      Returns:
        Batch tensor of the new observations.
      """
      reset_video_op = tf.cond(
          self._video_condition,
          lambda: tf.py_func(self._video_reset_writer, [], []),
          tf.no_op,
      )
      with tf.control_dependencies([reset_video_op]):
          inc_op = tf.assign_add(self._episode_counter, 1)
          with tf.control_dependencies(
              [self.history_buffer.reset(indices), inc_op]
          ):
              initial_frame_dump_op = tf.cond(
                  self._video_condition,
                  lambda: tf.py_func(
                      self._video_dump_frames,  # pylint: disable=g-long-lambda
                      [self.history_buffer.get_all_elements()],
                      [],
                  ),
                  tf.no_op,
              )
              observ_assign_op = self._observ.assign(
                  self.history_buffer.get_all_elements()[:, -1, ...]
              )
              with tf.control_dependencies(
                  [observ_assign_op, initial_frame_dump_op]
              ):
                  reset_model_op = tf.assign(
                      self._reset_model, tf.constant(1.0)
                  )
                  with tf.control_dependencies([reset_model_op]):
                      return tf.gather(
                          self._observ.read_value(), indices
                      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import os
  import numpy
  from tensor2tensor.data_generators.gym_env import DummyWorldModelProblem
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import common_video
  from tensor2tensor.rl.envs import in_graph_batch_env
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import trainer_lib
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 6 for calling the SimulatedBatchEnv obj's underlying member method code with example usage: obj._reset_non_empty(indices) and returns: tf