code: def test_exact_num_points_for_chunks(n_chunks, chunk_size):
      """Checks that the chunk generation works well with just enough points."""
      labels = gen_labels_for_chunks(n_chunks, chunk_size)
  
      constraints = Constraints(labels)
      chunks = constraints.chunks(
          n_chunks=n_chunks, chunk_size=chunk_size, random_state=SEED
      )
  
      chunk_no, size_each_chunk = np.unique(
          chunks[chunks >= 0], return_counts=True
      )
  
      np.testing.assert_array_equal(size_each_chunk, chunk_size)
      assert chunk_no.shape[0] == n_chunks
  
file_path: metric-learn/test/test_constraints.py
imports: import pytest
  import numpy
  from sklearn.utils import shuffle
  from metric_learn.constraints import Constraints
  from sklearn.datasets import make_blobs
label_desc: Use image node_id 2 for calling a global function with example usage: test_exact_num_points_for_chunks(n_chunks, chunk_size) without return types