TypeError: expected Element, got FamilyInstance

I would like to call FamilyInstance.GetParameters(aFI, “ParamName”) in Python Script node.

But I got this error “TypeError: expected Element, got FamilyInstance”

How can I get and set the Instance parameters in Python,

or how should I convert the FamilyInstance object to a Element object?

Hi Sam,

Below is an example of room names.