code: def _check_full_length(centroids):
      """Check that provided centroids are full-length (ie. not padded with
      nans).
  
      If some centroids are found to be padded with nans, TimeSeriesResampler is
      used to resample the centroids.
      """
      resampler = TimeSeriesResampler(sz=centroids.shape[1])
      return resampler.fit_transform(centroids)
  
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 2 for calling a global function with example usage: _check_full_length(centroids) and returns: resampler