def proto_key(self, string):
        """
        String received in the 'key' state.  If the key is empty, a complete
        box has been received.
        """
        if string:
            self._currentKey = string
            self.MAX_LENGTH = self._MAX_VALUE_LENGTH
            return 'value'
        else:
            self.boxReceiver.ampBoxReceived(self._currentBox)
            self._currentBox = None
            return 'init'

        String received in the 'key' state.  If the key is empty, a complete
        box has been received.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/amp.py