How to use bind_virtual_method in GDextension

Godot Version

4.3

Question

I was trying to figure out how to bind a virtual method using bind_virtual_method from the C++ side so that I could override method functionality from the GDScript side. But I just can’t figure out the parameters it requires. I can see that I can specify return type as one of the Variants for example, but I want to be returning an object that is defined within GDExtension. (And no I do not want to return Variant::OBJECT)

Is there any documentation anywhere on the ClassDB::bind methods? The example code in godot-cpp does not even feature ClassDB::bind_virtual_method.