Add root_node and leaf_node functions to MigrationGraph