def sort(self, key_or_list, direction=None):
        if direction is None:
            direction = 1
        if isinstance(key_or_list, (tuple, list)):
            for sortKey, sortDirection in reversed(key_or_list):
                self._dataset = iter(
                    sorted(
                        self._dataset,
                        key=lambda x: _resolve_sort_key(
                            sortKey,
                            x),
                        reverse=0 < sortDirection))
        else:
            self._dataset = iter(
                sorted(self._dataset,
                       key=lambda x: _resolve_sort_key(key_or_list, x),
                       reverse=direction < 0))
        return self
dataset/ETHPy150Open vmalloc/mongomock/mongomock/collection.py/Cursor.sort/swapped operands of `<`