def timeout_for_protocol(reactor, protocol):
 return Timeout(reactor, (2 * PING_INTERVAL.seconds), (lambda : protocol.transport.abortConnection()))

def timeout_for_protocol ( reactor , protocol ) : return Timeout ( reactor , ( 2 * PING_INTERVAL . seconds ) , ( lambda : protocol . transport . abortConnection ( ) ) )
create a timeout for inactive amp connections that will abort the connection when the timeout is reached .