def applyMR3(self): newOrientationsFound = False for partiallyDirectedAgg in self.perspectiveToAgg.values(): for relVar1, relVar2 in EdgeOrientation._findMR3Removals(partiallyDirectedAgg): if isinstance(relVar1, RelationalVariable) and isinstance(relVar2, RelationalVariable): self.propagateEdgeRemoval(partiallyDirectedAgg[relVar1][relVar2] [AbstractGroundGraph.UNDERLYING_DEPENDENCIES], recurse=True) self.recordEdgeOrientationUsage('MR3') newOrientationsFound = True return newOrientationsFound