code: def set_domain(self, values):
          
          _flattenedList = sorted(flatten(values))
          self.domain = tuple(_flattenedList[0] if d == 'min' else d for d in self.domain)
          self.domain = tuple(_flattenedList[-1] if d == 'max' else d for d in self.domain)
docs: Set domain of the colors based on min and max of a list of values.