code: def test_stratified_sampling_with_gaps(self):
      y = np.array([0] * 25 + [2] * 25 + [3] * 50)
  
      indices = stratified_sampling(y, n_samples=30)
      counts = np.bincount(np.array([y[i] for i in indices]))
      self.assertEqual(30, len(indices))
      self.assertEqual(4, len(counts))
      self.assertEqual(3, len(counts[counts >= 7]))
  
file_path: small-text/tests/unit/small_text/data/test_sampling.py
imports: import unittest
  import numpy
  from small_text.data import balanced_sampling, stratified_sampling
  from small_text.data.sampling import _get_class_histogram
label_desc: Use image node_id 4 for calling the StratifiedSamplingTest obj's underlying member method code with example usage: obj.test_stratified_sampling_with_gaps() without return types