How do I handle InstanceReferences?


I want to instance duplicate geometry from any architecture-model that is given to me. I’m using rhino3dm for python for this.
This is a sample-scene:

I’ve created an extrusion and instanced it via block command in the rhino-gui. This is what I get when I loop over the rhinoObjects:


There are 5 objects, one original extrusion and 4 references.
My questions is:

How can I create an Extrusion that is handled like a geometry that I’ve just made into a block, so that I can’t see the original in the viewport, but only it’s references?

Or in other words, how can I create what I just did in Rhino in rhino3dm?

edit: I know I probably need to use this:

but I can’t find any source on how to use it correctly.

So, I’m trying to add an instance definition that encapsulates a geometry, but I don’t seem to understand how to construct an instance with any properties.

What arguments can I put into the InstanceDefinition()?