code: def test_check_no_empty_cluster():
      labels = np.array([1, 1, 2, 0, 2])
      _check_no_empty_cluster(labels, 3)
      np.testing.assert_raises(
          EmptyClusterError, _check_no_empty_cluster, labels, 4
      )
  
file_path: tslearn/tslearn/tests/test_clustering.py
imports: import numpy
  from tslearn.utils import to_time_series_dataset, ts_size
  from tslearn.clustering import EmptyClusterError, TimeSeriesKMeans, KernelKMeans, KShape
  from tslearn.clustering.utils import _check_full_length, _check_no_empty_cluster
  from tslearn.metrics import cdist_dtw, cdist_soft_dtw
  from tslearn.preprocessing import TimeSeriesScalerMeanVariance
  from scipy.spatial.distance import cdist
label_desc: Use image node_id 1 for calling a global function with example usage: test_check_no_empty_cluster() without return types