def close(self):
        """
        Close the file.

        The file cannot be used once it has been closed.
        """
        self.closed = True
        self._file.close()
        self._file = None

        Close the file.

        The file cannot be used once it has been closed.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/logfile.py