def find_node(self, node, path):
        """Finds a node by the given path from the given node."""
        for hash_value in path:
            if isinstance(node, LeafStatisticsNode):
                break
            for stats in node.get_child_keys():
                if hash(stats) == hash_value:
                    node = node.get_child_node(stats)
                    break
            else:
                break
        return node
Finds a node by the given path from the given node.