code: def _assert_sample_size(y, num_samples):
      label_set_size = len(y)
      if num_samples > label_set_size:
          raise ValueError(
              f"Error! Requested number of samples {num_samples} "
              f"exceeds label set size "
          )
  
file_path: small-text/small_text/data/sampling.py
imports: import numpy
  from scipy.sparse import csr_matrix
  from sklearn.preprocessing import LabelEncoder
label_desc: Use image node_id 4 for calling a global function with example usage: _assert_sample_size(y, num_samples) without return types