Creating dimension types in a family

Good evening, colleagues! Have you ever had to face the issue of creating types in an open family with the help of a dynamo and a python (not a project, where the possibility exists for this with the Duplicate node). I ask to push on thoughts. Thank you!

See what’s here maybe:

Thank you, Yna_Db! I will understand, the topic is extensive)