code: def clear_relation(cls):
          
          for k, v in cls.properties.items():
              if isinstance(v, ReferenceProperty):
                  if hasattr(v, 'collection_name') and hasattr(v.reference_class, v.collection_name):
                      delattr(v.reference_class, v.collection_name)
  
                      if isinstance(v, OneToOne):
                          #append to reference_class._onetoone
                          del v.reference_class._onetoone[v.collection_name]
docs: Clear relation properties for reference Model, such as OneToOne, Reference,
          ManyToMany