Make a node "root of tree" in the godot editor from GDscript

ℹ Attention Topic was automatically imported from the old Question2Answer platform. 👤 Asked By newold In the godot editor when you right click on a node in the tree you can select an option that says “Make this node the root node”. How do I do the same from gdscript?