def METHOD_NAME(
    self, tab_tokens: List[Dict[str, Any]], parent: Optional[TabNode] = None
) -> List[TabsetNode]:
    open_index, close_index = 0, len(tab_tokens) - 1
    nodes: List[TabNode] = []
    tabsets: List[TabsetNode] = []
    previous: Optional[TabNode] = None
    while True:
        pairs = self._tab_token_pair(
            tab_tokens[open_index : close_index + 1], start=open_index
        )
        if pairs is None:
            break
        open_index, close_index = pairs
        if (
            previous is None
            or previous.key != tab_tokens[open_index]['key']
            or previous.end + 1 != tab_tokens[open_index]['index']
        ):
            tabset = TabsetNode(tab_tokens[open_index]['index'], parent)
            tabsets.append(tabset)
        node = TabNode(
            start=tab_tokens[open_index]['index'],
            end=tab_tokens[close_index]['index'],
            key=tab_tokens[open_index]['key'],
            info=tab_tokens[open_index]['info'],
            parent=tabset,
        )
        nodes.append(node)
        tabset.children.append(node)
        node.parent = tabset
        node.children = self.METHOD_NAME(
            tab_tokens[open_index + 1 : close_index], parent=node
        )
        if close_index + 1 == len(tab_tokens):
            break
        open_index, close_index = close_index + 1, len(tab_tokens) - 1
        previous = node
    return tabsets