from typing import List


def _reduce_args(stack: List, end_token: str) -> List[List]:
    """Helper function for `_parse_all_paragraphs_in_section`.
    
    Pop arguments for the xref off the top of the stack and return a list of argument lists,
    where the outer lists represent groups divided by separators."""
    start_token = end_token.replace('end', 'start')
    sep_token = end_token.replace('end', 'sep')
    args = [[]]
    while True:
        token = stack.pop()
        if token == start_token:
            return args
        elif token == sep_token:
            args.insert(0, [])
        else:
            args[0].insert(0, token)