I know there are many differences in Godot 4, you can see it in the documentation.
some i can show you:
.instance() => .instantiate()
makevisible(false) => _makevisible(false)
.geticon("Node", "EditorIcons") => .gettheme_icon("Node", "EditorIcons")
For the rest you can see the code I made:

source code