<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_opcode(self, opcode):
 """Set the opcode. @param opcode: the opcode @type opcode: int """

        self.flags &= 0x87FF
        self.flags |= dns.opcode.to_flags(opcode)