code: def _aggregated_markov_transition_field(
      X_mtf, n_samples, image_size, start, end
  ):
      X_amtf = np.empty((n_samples, image_size, image_size))
      for i in prange(n_samples):
          for j in prange(image_size):
              for k in prange(image_size):
                  X_amtf[i, j, k] = np.mean(
                      X_mtf[i, start[j] : end[j], start[k] : end[k]]
                  )
      return X_amtf
  
file_path: pyts/pyts/image/mtf.py
imports: import numpy
  from math import ceil
  from numba import njit, prange
  from sklearn.base import BaseEstimator
  from sklearn.utils.validation import check_array
  from ..base import UnivariateTransformerMixin
  from ..preprocessing import KBinsDiscretizer
  from ..utils import segmentation
label_desc: Use image node_id 3 for calling a global function with example usage: _aggregated_markov_transition_field(X_mtf, n_samples, image_size, start, end) and returns: X_amtf