rust-nodemap: add utils to create Nodes from Python objects
Differential Revision: https://phab.mercurial-scm.org/D8155