def intersection(self: Relation, other: Relation) -> Relation:
        """TODO: There are potentially many intersections of relations with negations."""

        match other:
            case AnyRelation():
                return deepcopy(self)
            case NegatedRelation(rel):
                return self.difference(rel)
            case GeometryRelation(ochild, oparent):
                if not self._compatibility_checks(other):
                    logger.warning(
                        f"{self.intersection} failed compatibility for {other=}"
                    )
                    return -AnyRelation()
                return self.__class__(
                    child_tags=self.child_tags.union(ochild),
                    parent_tags=self.parent_tags.union(oparent),
                    **{k: getattr(self, k) for k in self._extra_fields()},
                )
            case _:
                logger.warning(
                    f"Encountered unhandled {other=} for {self.intersection}"
                )
                return -AnyRelation()
TODO: There are potentially many intersections of relations with negations.
infinigen/core/constraints/constraint_language/relations.py