'Is other a response to self?
@rtype: bool'

def is_response(self, other):

    if (((other.flags & dns.flags.QR) == 0) or (self.id != other.id) or (dns.opcode.from_flags(self.flags) != dns.opcode.from_flags(other.flags))):
        return False
    if (dns.rcode.from_flags(other.flags, other.ednsflags) != dns.rcode.NOERROR):
        return True
    if dns.opcode.is_update(self.flags):
        return True
    for n in self.question:
        if (n not in other.question):
            return False
    for n in other.question:
        if (n not in self.question):
            return False
    return True
