This is not a typical usage of a scripting component. Why would this be something that needs to be written?
It’s possible, but not really advisable. A scripting component should still be a scripting component, otherwise, it would not be possible to understand what it really is.
I would suggest implementing this in C#, as this is really involved in a object-oriented way and the interface was meant for a standard .Net language, so type safety is important. However, it’s also possible in Python.
On the old forum, you can find a breakdown of how methods are invoked (by @DavidRutten):