class_docstr: Helper class for writing individual video frames.
class_docstr_tok: ["Helper","class","for","writing","individual","video","frames","."]
code: def write(self, frame=None, encoded_frame=None):
      import os  # pylint: disable=g-import-not-at-top
  
      if encoded_frame is None:
          raise ValueError("This writer only supports encoded frames.")
      path = os.path.join(
          self.output_dir, "frame_%05d.png" % self._counter
      )
      with tf.gfile.Open(path, "wb") as f:
          f.write(encoded_frame)
          self._counter += 1
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import contrib
  import tensorflow.compat.v1
  from tensorflow.python.ops import summary_op_util
label_desc: Use image node_id 2 for calling the IndividualFrameWriter obj's underlying member method code with example usage: obj.write(frame, encoded_frame) without return types