def _all_compat(self, other, compat_str):
        """Helper function for equals and identical"""

        def compat(x, y):
            return getattr(x.variable, compat_str)(y.variable)

        return (utils.dict_equiv(self.coords, other.coords, compat=compat) and
                compat(self, other))