code: def _next_file(self):
      
      while True:
        if self._bucket_iter:
          try:
            return self._bucket_iter.next().filename
          except StopIteration:
            self._bucket_iter = None
            self._bucket = None
        if self._index >= len(self._filenames):
          return
        filename = self._filenames[self._index]
        self._index += 1
        if self._delimiter is None or not filename.endswith(self._delimiter):
          return filename
        self._bucket = cloudstorage.listbucket(filename,
                                               delimiter=self._delimiter)
        self._bucket_iter = iter(self._bucket)
docs: Find next filename.
  
      self._filenames may need to be expanded via listbucket.
  
      Returns:
        None if no more file is left. Filename otherwise.