cyclegraph: add putNode() helper