<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_rainbow(self, duration):
 """Turn the bulb on and create a rainbow."""

        for i in range(0, 359):
            self.set_color_hsv(i, 100, 100)
            time.sleep(duration/359)