def equivalent(self, l, r):

        first = l.first
        second = l.second

        equivalent = self.equivalent

        if l.op != r.op:
            return False
        if isinstance(first, Query):
            if isinstance(second, Query):

                return equivalent(l.first, r.first) and \
                       equivalent(l.second, r.second) or \
                       equivalent(l.second, r.first) and \
                       equivalent(l.first, r.second)
            else:
                return equivalent(l.first, r.first)
        else:
            return l.first == r.first and l.second == r.second

    # -------------------------------------------------------------------------
Returns the data_specs specifying how the data is internally stored.
dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3hierarchy.py/S3TypeOfTests.equivalent--crossover with--dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/datasets/vector_spaces_dataset.py/VectorSpacesDataset.get_data_specs