code: def _open(self):
      
      # The gzip module supports directly setting encoding as of Python 3.3.
      # pylint: disable=unexpected-keyword-arg
      if py2to3.PY_3:
        return gzip.open(
            self.baseFilename, mode=self.mode, encoding=self.encoding)
  
      return gzip.open(self.baseFilename, self.mode)
docs: Opens the compressed log file.
  
      Returns
        file: file-like object of the resulting stream.