code: def generate_classes(self, items):
          "Generate classes from `items` by taking the sorted unique values."
          classes = set()
          for c in items: classes = classes.union(set(c))
          classes = list(classes)
          classes.sort()
          return classes