@lru_cache()<EOL>def is_regex_type(type_):
return (<EOL>callable(type_)<EOL>and getattr(type_, "<STR_LIT>", None) == REGEX_TYPE_NAME<EOL>and hasattr(type_, "<STR_LIT>")<EOL>and is_compiled_pattern(type_.__supertype__)<EOL>)<EOL>
Checks if the given type is a regex type.

    :param type_: The type to check
    :return: True if the type is a regex type, otherwise False
    :rtype: bool