code: def next_flightmode_colour(self):
          '''allocate a colour to be used for a flight mode'''
          if self.flightmode_colour_index > len(flightmode_colours):
              print("Out of colours; reusing")
              self.flightmode_colour_index = 0
          ret = flightmode_colours[self.flightmode_colour_index]
          self.flightmode_colour_index += 1
          return ref next_flightmode_colour(self):
          '''allocate a colour to be used for a flight mode'''
          if self.flightmode_colour_index > len(flightmode_colours):
              print("Out of colours; reusing")
              self.flightmode_colour_index = 0
          ret = flightmode_colours[self.flightmode_colour_index]
          self.flightmode_colour_index += 1
          return ret
docs: allocate a colour to be used for a flight mode