<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def switch_onoff(self, device, status):
 """Switch a Socket"""

        if status == 1 or status == True or status == '1':
            return self.switch_on(device)
        else:
            return self.switch_off(device)