Metadata with python plugin

I am programming fully with the python-plugin and I try to add Metadata to my Result.csv - but I do not understand how, and the python-examples do not cover this topic.

My goal is something similar as requested here:
i.e. I would like to store DUT and Instrument information (aswell as other properties) into the result.csv file. As I understood this can be achieved easily via Metadata, however I don’t know how to use this feature within the python-plugin.

I tried to add a MetaDataAttribute to a property, i.e.:
abc = property(Double, 1) .add_attribute(OpenTap.MetaDataAttribute(True)) .add_attribute(OpenTap.Display(“abc_disp”, “abc”)), however this fails with "Unable to cast object of type ‘OpenTap.MetaDataAttribute’ to type ‘System.Type’.

Could someone point me in a direction on how to achieve this?