tests: created conig class for create_nodes method and moved all argument to it.