

def process_input(self, input_):
    '\n        Process a specific input in the state machine.\n        '
    if (not isinstance(input_, ConnectionInputs)):
        raise ValueError('Input must be an instance of ConnectionInputs')
    try:
        (func, target_state) = self._transitions[(self.state, input_)]
    except KeyError:
        old_state = self.state
        input_.state = ConnectionState.CLOSED
        raise ProtocolError(('Invalid input %s in state %s' % (input_, old_state)))
    else:
        self.state = target_state
        if (func is not None):
            return func()
        return []

dataset/ETHPy150Open python-hyper/hyper-h2/h2/connection.py H2ConnectionStateMachine.process_input/VarMisuse@69/122 `self`->`input_`