Modify state_by_node2state_by_state work on non-deterministic, added non-deterministic examples to test package