code: def _calc_profile(m, knn_mask, score, exclusion_zone):
      """Calculate ClaSP profile for the kNN indices and a score.
  
      Parameters
      ----------
      m : int
          The window size to generate sliding windows
      knn_mask : array-like, shape = [k, n-m+1], dtype=int
          The knn indices
      score : function
          Scoring method used
      exclusion_zone : int
          Exclusion zone
  
      Returns
      -------
      profile : array-like, shape=[n-m+1], dtype = float
          The ClaSP
      """
      n_timepoints = knn_mask.shape[1]
      profile = np.full(
          shape=n_timepoints, fill_value=np.nan, dtype=np.float64
      )
  
      for split_idx in range(
          exclusion_zone, n_timepoints - exclusion_zone
      ):
          y_true, y_pred = _calc_knn_labels(knn_mask, split_idx, m)
          profile[split_idx] = score(y_true, y_pred)
  
      return profile
  
file_path: sktime/sktime/transformations/series/_clasp_numba.py
imports: import numpy
  import pandas
  from sktime.transformations.panel.matrix_profile import _sliding_dot_products
  from sktime.utils.numba.njit import njit
label_desc: Use image node_id 7 for calling a global function with example usage: _calc_profile(m, knn_mask, score, exclusion_zone) and returns: profile