def __contains__(self, entity):
        # TODO this doesn't take direction into account
        return any(entity is not rel.from_entity for rel in self.relation_set)
dataset/ETHPy150Open eevee/flax/flax/relation.py/RelationProxy.__contains__/operator `is` -> `is not`