def make_response(query, recursion_available=False, our_payload=8192):

    if query.flags & dns.flags.QR:
        raise dns.exception.FormError('specified query message is not a query')
    response = dns.message.Message(query.id)
    response.flags = dns.flags.QR | (query.flags & dns.flags.RD)
    if recursion_available:
        response.flags |= dns.flags.RA
    response.set_opcode(query.opcode())
    response.question = list(query.question)
    if query.edns >= 0:
        response.use_edns(0, 0, our_payload, query.payload)
    if not query.keyname is None:
        response.keyname = query.keyname
        response.keyring = query.keyring
        response.request_mac = query.mac
    return response
This will clean up newlines so that nl2br can properly be called on the
dataset/ETHPy150Open catap/namebench/nb_third_party/dns/message.py/make_response--crossover with--dataset/ETHPy150Open mozilla/addons-server/src/olympia/amo/utils.py/clean_nl