code: def test_chunk_case_one_miss_point(n_chunks, chunk_size):
      """Checks that the chunk generation breaks when one point is missing."""
      labels = gen_labels_for_chunks(n_chunks, chunk_size)
  
      assert len(labels) >= 1
      constraints = Constraints(labels[1:])
      with pytest.raises(ValueError) as e:
          constraints.chunks(
              n_chunks=n_chunks,
              chunk_size=chunk_size,
              random_state=SEED,
          )
  
      expected_message = (
          "Not enough possible chunks of %d elements in each"
          " class to form expected %d chunks - maximum number"
          " of chunks is %d"
      ) % (chunk_size, n_chunks, n_chunks - 1)
  
      assert str(e.value) == expected_message
  
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 3 for calling a global function with example usage: test_chunk_case_one_miss_point(n_chunks, chunk_size) without return types