code: def video_to_file(self, path):
          
          _LOGGER.debug("Writing video from %s to %s", self.name, path)
          response = self._cached_video
          if response is None:
              _LOGGER.error("No saved video exist for %s.",
                            self.name,
                            exc_info=True)
              return
          with open(path, 'wb') as vidfile:
              copyfileobj(response.raw, vidfile)
docs: Write video to file.
  
          :param path: Path to write file