code: def write_multi(self, frames, encoded_frames=None):
      
      if encoded_frames is None:
        # Infinite iterator.
        encoded_frames = iter(lambda: None, 1)
      for (frame, encoded_frame) in zip(frames, encoded_frames):
        self.write(frame, encoded_frame)
docs: Writes multiple video frames.