def dataReceived(self, data):
        for ch in data:
            if self.state == 'data':
                if ch == '\x1b':
                    self.state = 'escaped'
                else:
                    self.terminalProtocol.keystrokeReceived(ch, None)
            elif self.state <= 'escaped':
                if ch == '[':
                    self.state = 'bracket-escaped'
                    self.escBuf = []
                elif ch == 'O':
                    self.state = 'low-function-escaped'
                else:
                    self.state = 'data'
                    self._handleShortControlSequence(ch)
            elif self.state == 'bracket-escaped':
                if ch == 'O':
                    self.state = 'low-function-escaped'
                elif ch.isalpha() or ch == '~':
                    self._handleControlSequence(''.join(self.escBuf) + ch)
                    del self.escBuf
                    self.state = 'data'
                else:
                    self.escBuf.append(ch)
            elif self.state == 'low-function-escaped':
                self._handleLowFunctionControlSequence(ch)
                self.state = 'data'
            else:
                raise ValueError("Illegal state")
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/conch/insults/insults.py/ServerProtocol.dataReceived/operator `==` -> `<=`