How to arrange nodes in the node graph window via python?

If I create a bunch of nodes with a script they all appear at the center of the node graph window. How can I make it so they don’t overlap or have pre-determined positions on the window?

Thanks in advance.

1 Like