(self, key_list: list)
return curr_node, parent, node_key
Given return node at self.text_attr[addr1][addr2]...[addr_n] where addr_i in address_list
        There doesn't seem to be a nice way to do this in Python
        Returns tuple of three items
            1) node at key_list
            2) parent node
            3) key of node in parent node
        Returns (None, None, None) if address_list has a non-existing key
Given return node at self.text_attr[addr1][addr2]...[addr_n] where addr_i in address_list
        There doesn't seem to be a nice way to do this in Python
        Returns tuple of three items
            1) node at key_list
            2) parent node
            3) key of node in parent node
        Returns (None, None, None) if address_list has a non-existing key
Given return node at self . text_attr [ addr1 ] [ addr2 ] ... [ addr_n ] where addr_i in address_list There doesn t seem to be a nice way to do this in Python Returns tuple of three items 1 ) node at key_list 2 ) parent node 3 ) key of node in parent node Returns ( None None None ) if address_list has a non - existing key
def get_node_by_key_list(self, key_list: list) -> tuple:
        """
        Given return node at self.text_attr[addr1][addr2]...[addr_n] where addr_i in address_list
        There doesn't seem to be a nice way to do this in Python
        Returns tuple of three items
            1) node at key_list
            2) parent node
            3) key of node in parent node
        Returns (None, None, None) if address_list has a non-existing key
        """
        curr_node = getattr(self, self.text_attr, None)
        parent, node_key = None, None
        for key in key_list:
            parent = curr_node
            node_key = key
            curr_node = curr_node.get(key)
            if curr_node is None:
                return None, None, None
        return curr_node, parent, node_key
def get_node_by_key_list ( self , key_list : list ) -> tuple : curr_node = getattr ( self , self . text_attr , None ) parent , node_key = None , None for key in key_list : parent = curr_node node_key = key curr_node = curr_node . get ( key ) if curr_node is None : return None , None , None return curr_node , parent , node_key