code: def test_split_sampler_even_size(num_samples, num_parts):
      total_count = 0
      indices = []
      for part_idx in range(num_parts):
          sampler = s.SplitSampler(
              num_samples, num_parts, part_idx, even_size=True
          )
          count = 0
          for i in sampler:
              count += 1
              indices.append(i)
          total_count += count
          assert count == len(sampler)
          print(count)
      expected_count = (
          int(num_samples + num_parts - 1) // num_parts * num_parts
      )
      assert total_count == expected_count, (
          total_count,
          expected_count,
      )
  
file_path: gluon-nlp/tests/test_data_sampler.py
imports: import pytest
  import numpy
  from mxnet.gluon import data
  from gluonnlp.data import sampler
label_desc: Use image node_id 8 for calling a global function with example usage: test_split_sampler_even_size(num_samples, num_parts) without return types