code: def _start_new_warc_file(self, meta=False):
          '''Create and set as current WARC file.'''
          if self._params.max_size and not meta and self._params.appending:
              while True:
                  self._warc_filename = self._generate_warc_filename()
  
                  if os.path.exists(self._warc_filename):
                      _logger.debug('Skip {0}', self._warc_filename)
                      self._sequence_num += 1
                  else:
                      break
          else:
              self._warc_filename = self._generate_warc_filename(meta=meta)
  
          _logger.debug('WARC file at {0}', self._warc_filename)
  
          if not self._params.appending:
              wpull.util.truncate_file(self._warc_filename)
  
          self._warcinfo_record = WARCRecord()
          self._populate_warcinfo(self._params.extra_fields)
          self.write_record(self._warcinfo_recordf _start_new_warc_file(self, meta=False):
          '''Create and set as current WARC file.'''
          if self._params.max_size and not meta and self._params.appending:
              while True:
                  self._warc_filename = self._generate_warc_filename()
  
                  if os.path.exists(self._warc_filename):
                      _logger.debug('Skip {0}', self._warc_filename)
                      self._sequence_num += 1
                  else:
                      break
          else:
              self._warc_filename = self._generate_warc_filename(meta=meta)
  
          _logger.debug('WARC file at {0}', self._warc_filename)
  
          if not self._params.appending:
              wpull.util.truncate_file(self._warc_filename)
  
          self._warcinfo_record = WARCRecord()
          self._populate_warcinfo(self._params.extra_fields)
          self.write_record(self._warcinfo_record)
docs: Create and set as current WARC file.