<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _open(self):
 """Opens the compressed log file. Returns file: file-like object of the resulting stream. """

    # 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)