def R(self, proto, handler, buf):
            if not proto._cursorReports:
                handler.unhandledControlSequence(buf + 'R')
            elif buf.startswith('\x1b['):
                report = buf[2:]
                parts = report.split(';')
                if len(parts) != 2:
                    handler.unhandledControlSequence(buf + 'R')
                else:
                    Pl, Pc = parts
                    try:
                        Pl, Pc = int(Pl), int(Pc)
                    except __HOLE__:
                        handler.unhandledControlSequence(buf + 'R')
                    else:
                        d = proto._cursorReports.pop(0)
                        d.callback((Pc - 1, Pl - 1))
            else:
                handler.unhandledControlSequence(buf + 'R')
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/conch/insults/insults.py/ServerProtocol.ControlSequenceParser.R