code: def test_disable_shuffle(self):
      sampler = BucketBatchSampler(
          batch_size=2, sorting_keys=["text"], shuffle=False
      )
  
      grouped_instances = []
      for indices in sampler.get_batch_indices(self.instances):
          grouped_instances.append(
              [self.instances[idx] for idx in indices]
          )
      expected_groups = [
          [self.instances[4], self.instances[2]],
          [self.instances[0], self.instances[1]],
          [self.instances[3]],
      ]
      for idx, group in enumerate(grouped_instances):
          assert group == expected_groups[idx]
  
file_path: allennlp/tests/data/samplers/bucket_batch_sampler_test.py
imports: from allennlp.common import Params
  from allennlp.data import Instance, Token, Batch
  from allennlp.data.fields import TextField
  from allennlp.data.samplers import BucketBatchSampler
  from allennlp.data.data_loaders import MultiProcessDataLoader
  from .sampler_test import SamplerTest
label_desc: Use image node_id 2 for calling the TestBucketSampler obj's underlying member method code with example usage: obj.test_disable_shuffle() without return types