code: def set_infrared(self, infrared_brightness, callb=None, rapid=False):
          
          mypartial=partial(self.resp_set_infrared,infrared_brightness=infrared_brightness)
          if callb:
              mycallb=lambda x,y:(mypartial(y),callb(x,y))
          else:
              mycallb=lambda x,y:mypartial(y)
          if rapid:
              self.fire_and_forget(LightSetInfrared, {"infrared_brightness": infrared_brightness}, num_repeats=1)
              self.resp_set_infrared(None,infrared_brightness=infrared_brightness)
              if callb:
                  callb(self,None)
          else:
              self.req_with_ack(LightSetInfrared, {"infrared_brightness": infrared_brightness}, callb=mycallb)
docs: Convenience method to set the infrared status of the device
  
          This method will send a SetPower message to the device, and request callb be executed
          when an ACK is received. The default callback will simply cache the value.
  
              :param infrared_brightness: The new state
              :type infrared_brightness: int
              :param duration: The duration, in seconds, of the power state transition.
              :type duration: int
              :param callb: Callable to be used when the response is received. If not set,
                          self.resp_set_label will be used.
              :type callb: callable
              :param rapid: Whether to ask for ack (False) or not (True). Default False
              :type rapid: bool
              :returns: None
              :rtype: None