docs: def calculate_colors(self, values):
          """Return a list (or list of lists) of colors based on input values."""
          # set domain if it is not set
          _flattenedList = list(flatten(values))
          if not self.is_domain_set:
              self.set_domain(_flattenedList)
  
          _flattenedColors = range(len(_flattenedList))
          for count, value in enumerate(_flattenedList):
              _flattenedColors[count] = self.calculate_color(value)
  
          return unflatten(values, iter(_flattenedColors))