(
    reverse_key_func: Optional[Union[str, Callable[[str], Tuple[str, str, int]]]]
)
return None
Function to decide which reverse key function to use

    Defaults to ``None``, as any other value might not apply to the given
    KEY_FUNCTION. Also the user may not use any of the operations that require
    reversing the key_func.
Function to decide which reverse key function to use
Function to decide which reverse key function to use
def get_reverse_key_func(
    reverse_key_func: Optional[Union[str, Callable[[str], Tuple[str, str, int]]]]
) -> Optional[Callable[[str], Tuple[str, str, int]]]:
    """
    Function to decide which reverse key function to use

    Defaults to ``None``, as any other value might not apply to the given
    KEY_FUNCTION. Also the user may not use any of the operations that require
    reversing the key_func.
    """
    if reverse_key_func is not None:
        if callable(reverse_key_func):
            return reverse_key_func
        else:
            return cast(
                Callable[[str], Tuple[str, str, int]],
                import_string(reverse_key_func),
            )
    return None
def get_reverse_key_func ( reverse_key_func : Optional [ Union [ str , Callable [ [ str ] , Tuple [ str , str , int ] ] ] ] ) -> Optional [ Callable [ [ str ] , Tuple [ str , str , int ] ] ] : if reverse_key_func is not None : if callable ( reverse_key_func ) : return reverse_key_func else : return cast ( Callable [ [ str ] , Tuple [ str , str , int ] ] , import_string ( reverse_key_func ) , ) return None