def METHOD_NAME(prev_token: tokenize.TokenInfo) -> str:
    # NOTE: position is expressed as a (posLine, posColumn) tuple. We assume that the
    # formula is written on a single line
    start = prev_token.end[1]
    # Skipping the current token, which is [
    while tok := next_token():
        # We reached the end of the column name. Store an alias for it and yield the alias
        if tok.type == tokenize.OP and tok.string == "]":
            end = tok.start[1]
            if end - start < 1:
                raise EmptyColumnName(f"Got an empty column name at {prev_token.start[1]}")
            col_name = f"__VQB_COL__{len(self._columns)}"
            self._columns[col_name] = self._formula[start:end]
            return col_name
        prev_token = tok
    raise UnclosedColumnName(
        f"Expected column to be closed near {prev_token.string} at {prev_token.start[1]}"
    )