async def METHOD_NAME(loop: AbstractEventLoop, rpcTransport: RpcTransport):
    await rpcTransport.prepare()
    mutex = threading.Lock()
    def send(message, reject=None, serializationContext=None):
        with mutex:
            if serializationContext:
                buffers = serializationContext.get('buffers', None)
                if buffers:
                    for buffer in buffers:
                        rpcTransport.writeBuffer(buffer, reject)
            rpcTransport.writeJSON(message, reject)
    peer = rpc.RpcPeer(send)
    peer.nameDeserializerMap['Buffer'] = SidebandBufferSerializer()
    peer.constructorSerializerMap[bytes] = 'Buffer'
    peer.constructorSerializerMap[bytearray] = 'Buffer'
    peer.constructorSerializerMap[memoryview] = 'Buffer'
    async def peerReadLoop():
        try:
            await readLoop(loop, peer, rpcTransport)
        except:
            peer.kill()
            raise
    return peer, peerReadLoop