

def detach(self):
    cls = type(self)
    self.from_entity.relates_to[cls].remove(self)
    self.to_entity.related_to[cls].remove(self)
    del self.from_entity
    del self.to_entity

dataset/ETHPy150Open eevee/flax/flax/relation.py Relation.detach/original