able to remove useless nodes, but still get error in report_partition. Maybe I should add a check for graph integrity before using it.