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.
code: def _video_dump_frame(self, obs, rews):
      if not self._ffmpeg_works:
          return
      if self._video_writer is None:
          self._video_counter += 1
          self._video_writer = common_video.WholeVideoWriter(
              fps=10,
              output_path=os.path.join(
                  self._video_dir, "{}.avi".format(self._video_counter)
              ),
              file_format="avi",
          )
      img = PIL_Image().new(
          "RGB",
          (obs.shape[-2], 11),
      )
      draw = PIL_ImageDraw().Draw(img)
      draw.text(
          (0, 0), "r:{:3}".format(int(rews[-1])), fill=(255, 0, 0)
      )
      self._video_writer.write(
          np.concatenate([np.asarray(img), obs[-1]], axis=0)
      )
  
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 9 for calling the SimulatedBatchEnv obj's underlying member method code with example usage: obj._video_dump_frame(obs, rews) without return types