def finish_to_disk(self):
    """Finishes writing frames and saves output to disk, if any."""
    output = self.finish()  # pylint: disable=assignment-from-no-return
    if output is not None:
      self.save_to_disk(output)
Finishes writing frames and saves output to disk, if any.
tensor2tensor/layers/common_video.py