code: def _minimum_distance(mp, ip, dp, i, m, dp_len):
      """Find the minimum distance in the distance profile, considering exclusion zone.
  
      Parameters
      ----------
      mp: numpy.array
          Matrix profile.
      ip: numpy.array
          Index profile.
      dp: numpy.array
          Distance profile.
      i: int
          Index of the element to be compared from the matrix profile.
      m: int
          Length of the subsequences.
      dp_len: int
          Length of the distance profile.
  
      Output
      ------
      mp: numpy.array
          Array with the distance between every subsequence and its
          nearest neighbor from the same time series.
      ip: numpy.array
          Array with the indexes of the nearest neighbors of each
          subsequence.
      """
      # Initialization
      min_value = float("inf")
      min_index = -1
  
      for k in range(0, dp_len):
          if dp[k] < min_value and (k < i - m / 2 or k > i + m / 2):
              min_value = dp[k]
              min_index = k
      mp[i] = min_value
      ip[i] = min_index
  
      return mp, ip
  
file_path: sktime/sktime/transformations/panel/matrix_profile.py
imports: import numpy
  import pandas
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 3 for calling a global function with example usage: _minimum_distance(mp, ip, dp, i, m, dp_len) and returns: mp,  ip