async def receive_dial_in(reader: asyncio.StreamReader, writer: asyncio.StreamWriter, private_key: keys.PrivateKey, p2p_handshake_params: DevP2PHandshakeParams, protocol_handshakers: Sequence[HandshakerAPI[ProtocolAPI]]) -> Connection:
    transport = (await Transport.receive_connection(reader=reader, writer=writer, private_key=private_key))
    try:
        (multiplexer, devp2p_receipt, protocol_receipts) = (await negotiate_protocol_handshakes(transport=transport, p2p_handshake_params=p2p_handshake_params, protocol_handshakers=protocol_handshakers))
    except BaseException:
        try:
            (await transport.close())
        except ConnectionResetError:
            transport.logger.debug('Could not wait for transport to close')
        raise
    connection = Connection(multiplexer=multiplexer, devp2p_receipt=devp2p_receipt, protocol_receipts=protocol_receipts, is_dial_out=False)
    return connection
async def receive_dial_in(reader: asyncio.StreamReader, writer: asyncio.StreamWriter, private_key: keys.PrivateKey, p2p_handshake_params: DevP2PHandshakeParams, protocol_handshakers: Sequence[HandshakerAPI[ProtocolAPI]]) -> Connection:
    transport = (await Transport.receive_connection(reader=reader, writer=writer, private_key=private_key))
    try:
        (multiplexer, devp2p_receipt, protocol_receipts) = (await negotiate_protocol_handshakes(transport=transport, p2p_handshake_params=p2p_handshake_params, protocol_handshakers=protocol_handshakers))
    except BaseException:
        try:
            (await transport.close())
        except ConnectionResetError:
            transport.logger.debug('Could not wait for transport to close')
        raise
    connection = Connection(multiplexer=multiplexer, devp2p_receipt=devp2p_receipt, protocol_receipts=protocol_receipts, is_dial_out=False)
    return connection