def _finishPortSetup(self):
        """
        Finish setting up the serial port.

        This is a separate method to facilitate testing.
        """
        flags, comstat = self._clearCommError()
        rc, self.read_buf = win32file.ReadFile(self._serial._port_handle,
                                               win32file.AllocateReadBuffer(1),
                                               self._overlappedRead)

        Finish setting up the serial port.

        This is a separate method to facilitate testing.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/_win32serialport.py