def METHOD_NAME(self):
    train_ds_len = len(self.train_ds)
    ds_iter = iter(range(train_ds_len - 1, -1, -1))
    train_batch_sampler = SamplerHelper(self.train_ds, ds_iter)
    sort_sampler = train_batch_sampler.sort(cmp=lambda x, y, dataset: cmp(x, y), buffer_size=5)
    for i, sample in enumerate(sort_sampler):
        if i < 5:
            self.check_output_equal(i + 5, sample)
        else:
            self.check_output_equal(i - 5, sample)