code: def enum(cls, options, values):
      
      names, real = zip(*options)
      del names  # unused
  
      def factory(i, name):
        return cls(i, name, (len(real),), lambda a: real[a[0]], values)
      return factory
docs: Create an ArgumentType where you choose one of a set of known values.