You can just use the example nodetree script under the Templates menu of the text editor if you like.
I am trying to emulate what Cycles does for a custom render exporter. This means I need a way to specify world shaders and object based shaders. This may not be possible at this time but I thought I would ask.
I tested the example and ran it
and I can see a new icon added on bottom header of node editor
but don’t see any nodes in nodes editor!
if you click on the checkerboard icon on bottom header you can see the other mat and world icon!
but that does not show how to add custom node to either one!