code: def enums(*names):
      
      if len(names) != len(list(set(names))):
          raise TypeError("Names in an enumeration must be unique")
  
      item_types = set(True if isinstance(x, tuple) else False for x in names)
      if len(item_types) == 2:
          raise TypeError("Mixing of ordered and unordered enumeration items is not allowed")
      else:
          is_ordered = item_types.pop() is True
          if not is_ordered:
              names = [(None, x) for x in names]
          return [EnumValue(name, order) for order, name in names]
docs: Returns a set of `EnumValue` objects with specified names and optionally orders.
  
      Values in an enumeration must have unique names and be either all ordered or all unordered.