Move the node_final_assertions to a method on the Node class and rename it.
node_final_assertions
Node
The rename is to make the method more clear on what it really does. Also make the method private, as we will only be using it internally.