@classmethod
def enum(cls, enum):
    """Accepts any form of an enum and returns the enum"""
    for item in cls:
        if (enum is item or enum == item.name or enum == item.value or cls.
            title(enum) == item):
            return item
    raise ValueError('Value "{}" is not a valid {}'.format(enum, cls.__name__))
