def connect(self) -> BufferedIOBase:
    _winapi.ConnectNamedPipe(self._handle, _winapi.NULL)
    fd = msvcrt.open_osfhandle(self._handle, 0)
    self.file = os.fdopen(fd, 'w+b')
    return self.file
def connect(self) -> BufferedIOBase:
    _winapi.ConnectNamedPipe(self._handle, _winapi.NULL)
    fd = msvcrt.open_osfhandle(self._handle, 0)
    self.file = os.fdopen(fd, 'w+b')
    return self.file