def chase(self, duration: float = <NUM_LIT>, num_lights: int = <NUM_LIT:2>, ticks: int = <NUM_LIT:20>):
seq = [<EOL>button_from_name('<STR_LIT>'),<EOL>button_from_name('<STR_LIT>'),<EOL>button_from_name('<STR_LIT>'),<EOL>button_from_name('<STR_LIT>'),<EOL>button_from_name('<STR_LIT>'),<EOL>button_from_name('<STR_LIT>'),<EOL>button_from_name('<STR_LIT>'),<EOL>button_from_name('<STR_LIT>'),<EOL>button_from_name('<STR_LIT>'),<EOL>button_from_name('<STR_LIT>'),<EOL>button_from_name('<STR_LIT>'),<EOL>button_from_name('<STR_LIT>'),<EOL>]<EOL>num_lights = num_lights if num_lights in [<NUM_LIT:1>, <NUM_LIT:2>, <NUM_LIT:3>, <NUM_LIT:4>] else <NUM_LIT:2><EOL>its = [cycle(seq) for _ in range(num_lights)]<EOL>for i, it in enumerate(its):<EOL><INDENT>if i:<EOL><INDENT>consume(it, i * (len(seq) // num_lights))<EOL><DEDENT><DEDENT>for x in range(ticks):<EOL><INDENT>for it in its:<EOL><INDENT>button = next(it)<EOL>self.light_on(button)<EOL><DEDENT>time.sleep(duration)<EOL>self.all_off()<EOL><DEDENT>
Display an animated light chaser pattern
Chase will last ticks * duration seconds
:param duration: How long each chase step will last in seconds
:param num_lights: How many lights in the chase (1 to 4)
:param ticks: How many chase steps.