def __decode_symbol(symbol: str):
    """Takes in a symbol and determines what to do with it.

    :param symbol: Single char symbol.
    :return: None if branch is continuing, else closing symbol.
    """
    if symbol in ("(", "[", "{", "<"):
        return None  # Branching a new node
    # closing parent nodes, use opening symbol for comparisons.
    if symbol == ")":
        return "("
    if symbol == "]":
        return "["
    if symbol == "}":
        return "{"
    if symbol == ">":
        return "<"
    raise ValueError(f"Mate, I dunno what to do with `{symbol}`.")