def _colorize(self, color, text):
        """Returns a string that prints the given text in the given color
        in a terminal that is ANSI color-aware. The color must be something
        in DARK_COLORS or LIGHT_COLORS.
        """
        if color in self.DARK_COLORS:
            escape = self.COLOR_ESCAPE + "%im" % (self.DARK_COLORS.index(color) + 30)
        elif self.LIGHT_COLORS in color:
            escape = self.COLOR_ESCAPE + "%i;01m" % (self.LIGHT_COLORS.index(color) + 30)
        else:
            raise ValueError('no such color %s', color)
        return escape + text + self.RESET_COLOR
dataset/ETHPy150Open MartinPaulEve/PlotSummary/interactive.py/Interactive._colorize/swapped operands of `in`