code: def test_get_file_row_ranges_and_remainder(self) -> None:
      lengths = [14, 17, 20]
      world_size = 3
      expected = [
          {0: (0, 13), 1: (0, 2)},
          {1: (3, 16), 2: (0, 2)},
          {2: (3, 19)},
      ]
  
      for i in range(world_size):
          self.assertEqual(
              (expected[i], 0),
              BinaryCriteoUtils.get_file_row_ranges_and_remainder(
                  lengths=lengths,
                  rank=i,
                  world_size=world_size,
              ),
          )
  
imports: import contextlib
  import math
  import os
  import random
  import tempfile
  from typing import Any, Dict, List, Optional
  import numpy
  from torch.utils.data import DataLoader
  from torchrec.datasets.criteo import BinaryCriteoUtils, CAT_FEATURE_COUNT, criteo_kaggle, criteo_terabyte, InMemoryBinaryCriteoIterDataPipe, INT_FEATURE_COUNT
  from torchrec.datasets.test_utils.criteo_test_utils import CriteoTest
  from torchrec.datasets.utils import Batch
label_desc: Use image node_id 3 for calling the TestBinaryCriteoUtils obj's underlying member method code with example usage: obj.test_get_file_row_ranges_and_remainder() without return types