<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_unused_color(self):
 """Returns an xlwt color index that has not been previously returned by this instance. Attempts to maximize the distance between the color and all previously used colors. """

        if not self.unused_colors:
            # If we somehow run out of colors, reset the color matcher.
            self.reset()
        used_colors = [c for c in self.xlwt_colors if c not in self.unused_colors]
        result_color = max(self.unused_colors,
                           key=lambda c: min(self.color_distance(c, c2)
                                             for c2 in used_colors))
        result_index = self.xlwt_colors.index(result_color)
        self.unused_colors.discard(result_color)
        return result_index