code: def FlashFromFile(self, partition, source_file, source_len=0,
                        info_cb=DEFAULT_MESSAGE_CALLBACK, progress_callback=None):
          
          if source_len == 0:
              # Fall back to stat.
              source_len = os.stat(source_file).st_size
          download_response = self.Download(
              source_file, source_len=source_len, info_cb=info_cb,
              progress_callback=progress_callback)
          flash_response = self.Flash(partition, info_cb=info_cb)
          return download_response + flash_response
docs: Flashes a partition from the file on disk.
  
          Args:
            partition: Partition name to flash to.
            source_file: Filename to download to the device.
            source_len: Optional length of source_file, uses os.stat if not provided.
            info_cb: See Download.
            progress_callback: See Download.
  
          Returns:
            Download and flash responses, normally nothing.