<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def colors(self, brew=None, range_=None):
 """Convenience method for adding color brewer scales to charts with a color scale, such as stacked or grouped bars. See the colors here: http://colorbrewer2.org/ Or here: http://bl.ocks.org/mbostock/5577023 This assumes that a 'color' scale exists on your chart. Parameters brew: string, default None Color brewer scheme (BuGn, YlOrRd, etc) range: list, default None List of colors. Ex: ['#ac4142', '#d28445', '#f4bf75'] """

        if brew:
            self.scales['color'].range = brews[brew]
        elif range_:
            self.scales['color'].range = range_
        return self