code: def _prescrump(
      T_A,
      T_B,
      m,
      μ_Q,
      σ_Q,
      M_T,
      Σ_T,
      Q_subseq_isconstant,
      T_subseq_isconstant,
      indices,
      s,
      excl_zone=None,
      k=1,
  ):
      """
      A Numba JIT-compiled implementation of the preSCRIMP algorithm.
  
      Parameters
      ----------
      T_A : numpy.ndarray
          The time series or sequence for which to compute the matrix profile
  
      T_B : numpy.ndarray
          The time series or sequence that will be used to annotate T_A. For every
          subsequence in T_A, its nearest neighbor in T_B will be recorded.
  
      m : int
          Window size
  
      μ_Q : numpy.ndarray
          Sliding window mean for `T_A`
  
      σ_Q : numpy.ndarray
          Sliding window standard deviation for `T_A`
  
      M_T : numpy.ndarray
          Sliding window mean for `T_B`
  
      Σ_T : numpy.ndarray
          Sliding window standard deviation for `T_B`
  
      Q_subseq_isconstant : numpy.ndarray
          A boolean array that indicates whether a subsequence in `T_A` is constant (True)
  
      T_subseq_isconstant : numpy.ndarray
          A boolean array that indicates whether a subsequence in `T_B` is constant (True)
  
      indices : numpy.ndarray
          The subsequence indices to compute `prescrump` for
  
      s : int
          The sampling interval that defaults to
          `int(np.ceil(m / config.STUMPY_EXCL_ZONE_DENOM))`
  
      excl_zone : int
          The half width for the exclusion zone relative to the `i`.
  
      k : int, default 1
          The number of top `k` smallest distances used to construct the matrix profile.
          Note that this will increase the total computational time and memory usage
          when k > 1.
  
      Returns
      -------
      out1 : numpy.ndarray
          The (top-k) matrix profile. When k=1 (default), the first (and only) column
          in this 2D array consists of the matrix profile. When k > 1, the output
          has exactly `k` columns consisting of the top-k matrix profile.
  
      out2 : numpy.ndarray
          The (top-k) matrix profile indices. When k=1 (default), the first (and only)
          column in this 2D array consists of the matrix profile indices. When k > 1,
          the output has exactly `k` columns consisting of the top-k matrix profile
          indices.
  
      Notes
      -----
      `DOI: 10.1109/ICDM.2018.00099 \
      <https://www.cs.ucr.edu/~eamonn/SCRIMP_ICDM_camera_ready_updated.pdf>`__
  
      See Algorithm 2
      """
      n_threads = numba.config.NUMBA_NUM_THREADS
      l = T_A.shape[0] - m + 1
      P_squared = np.full((n_threads, l, k), np.inf, dtype=np.float64)
      I = np.full((n_threads, l, k), -1, dtype=np.int64)
  
      idx_ranges = core._get_ranges(
          len(indices), n_threads, truncate=False
      )
      for thread_idx in prange(n_threads):
          _compute_PI(
              T_A,
              T_B,
              m,
              μ_Q,
              σ_Q,
              M_T,
              Σ_T,
              Q_subseq_isconstant,
              T_subseq_isconstant,
              indices,
              idx_ranges[thread_idx, 0],
              idx_ranges[thread_idx, 1],
              thread_idx,
              s,
              P_squared,
              I,
              excl_zone,
              k,
          )
  
      for thread_idx in range(1, n_threads):
          core._merge_topk_PI(
              P_squared[0], P_squared[thread_idx], I[0], I[thread_idx]
          )
  
      return np.sqrt(P_squared[0]), I[0]
  
file_path: stumpy/stumpy/scrump.py
imports: import numba
  import numpy
  from numba import njit, prange
  from .None import config, core
  from .scraamp import prescraamp, scraamp
  from .stump import _stump
label_desc: Use image node_id 3 for calling a global function with example usage: _prescrump(T_A, T_B, m, μ_Q, σ_Q, M_T, Σ_T, Q_subseq_isconstant, T_subseq_isconstant, indices, s, excl_zone, k) and returns: np,  I