code: def _all_compat(self, other, compat_str):
          
  
          # some stores (e.g., scipy) do not seem to preserve order, so don't
          # require matching order for equality
          def compat(x, y):
              return getattr(x, compat_str)(y)
  
          return (self._coord_names == other._coord_names and
                  utils.dict_equiv(self._variables, other._variables,
                                   compat=compat))
docs: Helper function for equals and identical