def _get_subtree(self, treelist, path):
        """recursive helper to look up node-tuple for `path` in `treelist`"""
        subtree = None
        if len(path) > 1:
            subtree = self._get_subtree(treelist[path[0]][1], path[1:])
        else:
            try:
                subtree = treelist[path[0]]
            except (IndexError, TypeError):
                pass
        return subtree
dataset/ETHPy150Open kdart/pycopia/QA/pycopia/QA/tui/walkers.py/SimpleTreeWalker._get_subtree/original