Creates a type converter for an enumeration or text-to-value mapping.

        :param enum_mappings: Defines enumeration names and values.
        :return: Type converter function object for the enum/mapping.

def make_enum(enum_mappings):
        """
        Creates a type converter for an enumeration or text-to-value mapping.

        :param enum_mappings: Defines enumeration names and values.
        :return: Type converter function object for the enum/mapping.
        """
        if (inspect.isclass(enum_mappings) and
            issubclass(enum_mappings, enum.Enum)):
            enum_class = enum_mappings
            enum_mappings = enum_class.__members__

        def convert_enum(text):
            if text not in convert_enum.mappings:
                text = text.lower()     # REQUIRED-BY: parse re.IGNORECASE
            return convert_enum.mappings[text]    #< text.lower() ???
        convert_enum.pattern = r"|".join(enum_mappings.keys())
        convert_enum.mappings = enum_mappings
        return convert_enum