def finishedFileTransfer(self, lastsent):
        """
        Send the termination sequence.

        @type lastsent: L{bytes}
        @param lastsent: The last character of the file.
        """
        if lastsent != b'\n':
            line = b'\r\n.'
        else:
            line = b'.'
        self.sendLine(line)

        Send the termination sequence.

        @type lastsent: L{bytes}
        @param lastsent: The last character of the file.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/pop3.py