How do I print the render tree?

I did this one time, but I cant find the code again.

I need to print a list of all the nodes that are currently in the scene graph.

render.ls()

Thanks.