def calculate_colors(self, values):
<EOL>_flattenedList = list(flatten(values))<EOL>if not self.is_domain_set:<EOL><INDENT>self.set_domain(_flattenedList)<EOL><DEDENT>_flattenedColors = range(len(_flattenedList))<EOL>for count, value in enumerate(_flattenedList):<EOL><INDENT>_flattenedColors[count] = self.calculate_color(value)<EOL><DEDENT>return unflatten(values, iter(_flattenedColors))<EOL>
Return a list (or list of lists) of colors based on input values.