code: def switch_toggle(self, device):
          
          state = self.get_state(device)
          if(state == '1'):
              return self.switch_off(device)
  
          elif(state == '0'):
              return self.switch_on(device)
          else:
              return state
docs: Toggles the current state of the given device