code: def test_distributed_sortish_sampler_splits_indices_between_procs(
      self,
  ):
      ds, max_tokens, tokenizer = self._get_dataset()
      ids1 = set(
          DistributedSortishSampler(
              ds, 256, num_replicas=2, rank=0, add_extra_examples=False
          )
      )
      ids2 = set(
          DistributedSortishSampler(
              ds, 256, num_replicas=2, rank=1, add_extra_examples=False
          )
      )
      assert ids1.intersection(ids2) == set()
  
imports: import os
  from pathlib import Path
  import numpy
  import pytest
  from torch.utils.data import DataLoader
  from pack_dataset import pack_data_dir
  from parameterized import parameterized
  from save_len_file import save_len_file
  from transformers import AutoTokenizer
  from transformers.models.mbart.modeling_mbart import shift_tokens_right
  from transformers.testing_utils import TestCasePlus, slow
  from utils import FAIRSEQ_AVAILABLE, DistributedSortishSampler, LegacySeq2SeqDataset, Seq2SeqDataset
label_desc: Use image node_id 7 for calling the TestAll obj's underlying member method code with example usage: obj.test_distributed_sortish_sampler_splits_indices_between_procs() without return types