Changing Python component icon with different state: possible?

Hello
How we can change Ghpy component icon when the state change from True to False?
I tried this but didn’t work

dont’ think there is a setter for that property

also don’t think the icon can be changed at runtime. there is an Icon virtual property but that’s for overriding when you compile…
i’m curious to know if it can though.

Thank you
With c# is possible but i hope find a solution with Python.
I read a tip from @DavidRutten somewhere in the forum but i don’t know how to use it with Python