code: def _normalize_pan(
      pan, ms, bfs_indices, n_processed, T_min, T_max, p=2.0
  ):
      """
      Normalize the pan matrix profile nearest neighbor distances (inplace) relative
      to the corresponding subsequence length from which they were computed
  
      Parameters
      ----------
      pan : numpy.ndarray
          The pan matrix profile
  
      ms : numpy.ndarray
          The breadth-first-search sorted subsequence window sizes
  
      bfs_indices : numpy.ndarray
          The breadth-first-search indices
  
      n_processed : numpy.ndarray
          The number of subsequence window sizes and breadth-first-search indices to
          normalize
  
      T_min : float
          The min value in `T`
  
      T_max : float
          The max value in `T`
  
      p : float, default 2.0
          The p-norm to apply for computing the Minkowski distance. Minkowski distance is
          typically used with `p` being 1 or 2, which correspond to the Manhattan distance
          and the Euclidean distance, respectively.
  
      Returns
      -------
      None
      """
      idx = bfs_indices[:n_processed]
      norm = 1.0 / (
          np.abs(T_max - T_min) * np.power(ms[:n_processed], 1.0 / p)
      )
      pan[idx] = np.minimum(1.0, pan[idx] * np.expand_dims(norm, 1))
  
file_path: stumpy/stumpy/aamp_stimp.py
imports: import numpy
  from .None import core
  from .aamp import aamp
  from .aamped import aamped
  from .scraamp import scraamp
label_desc: Use image node_id 1 for calling a global function with example usage: _normalize_pan(pan, ms, bfs_indices, n_processed, T_min, T_max, p) without return types