code: def _check_no_empty_cluster(labels, n_clusters):
      """Check that all clusters have at least one sample assigned."""
  
      for k in range(n_clusters):
          if numpy.sum(labels == k) == 0:
              raise EmptyClusterError
  
file_path: tslearn/tslearn/clustering/utils.py
imports: from sklearn.metrics.cluster import silhouette_score
  from scipy.spatial.distance import cdist
  import numpy
  from tslearn.metrics import cdist_dtw, cdist_soft_dtw_normalized
  from tslearn.preprocessing import TimeSeriesResampler
  from tslearn.utils import to_time_series_dataset, to_time_series
label_desc: Use image node_id 1 for calling a global function with example usage: _check_no_empty_cluster(labels, n_clusters) without return types