<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_mode(self, controlmode, drivemode):
 """Higher level abstraction for setting the mode register. This will set the mode according the the @controlmode and @drivemode you specify. @controlmode and @drivemode should come from the ControlMode and DriveMode class respectively."""

        self.set_register(Addr.Mode, [0x01 | controlmode | drivemode])