code: def prescrump(
      T_A,
      m,
      T_B=None,
      s=None,
      normalize=True,
      p=2.0,
      k=1,
      T_A_subseq_isconstant=None,
      T_B_subseq_isconstant=None,
  ):
      """
      A convenience wrapper around the Numba JIT-compiled parallelized
      `_prescrump` function which computes the approximate (top-k) matrix
      profile according to the preSCRIMP algorithm.
  
      Parameters
      ----------
      T_A : numpy.ndarray
          The time series or sequence for which to compute the matrix profile
  
      m : int
          Window size
  
      T_B : numpy.ndarray, default None
          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.
  
      s : int, default None
          The sampling interval that defaults to
          `int(np.ceil(m / config.STUMPY_EXCL_ZONE_DENOM))`
  
      normalize : bool, default True
          When set to `True`, this z-normalizes subsequences prior to computing distances.
          Otherwise, this function gets re-routed to its complementary non-normalized
          equivalent set in the `@core.non_normalized` function decorator.
  
      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. This parameter is ignored when
          `normalize == True`.
  
      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.
  
      T_A_subseq_isconstant : numpy.ndarray or function, default None
          A boolean array that indicates whether a subsequence in `T_A` is constant
          (True). Alternatively, a custom, user-defined function that returns a
          boolean array that indicates whether a subsequence in `T_A` is constant
          (True). The function must only take two arguments, `a`, a 1-D array,
          and `w`, the window size, while additional arguments may be specified
          by currying the user-defined function using `functools.partial`. Any
          subsequence with at least one np.nan/np.inf will automatically have its
          corresponding value set to False in this boolean array.
  
      T_B_subseq_isconstant : numpy.ndarray or function, default None
          A boolean array that indicates whether a subsequence in `T_B` is constant
          (True). Alternatively, a custom, user-defined function that returns a
          boolean array that indicates whether a subsequence in `T_B` is constant
          (True). The function must only take two arguments, `a`, a 1-D array,
          and `w`, the window size, while additional arguments may be specified
          by currying the user-defined function using `functools.partial`. Any
          subsequence with at least one np.nan/np.inf will automatically have its
          corresponding value set to False in this boolean array.
  
      Returns
      -------
      P : numpy.ndarray
          The (top-k) matrix profile. When k = 1 (default), this is a 1D array
          consisting of the matrix profile. When k > 1, the output is a 2D array that
          has exactly `k` columns consisting of the top-k matrix profile.
  
      I : numpy.ndarray
          The (top-k) matrix profile indices. When k = 1 (default), this is a 1D array
          consisting of the matrix profile indices. When k > 1, the output is a 2D
          array that 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
      """
      (
          T_A,
          T_B,
          μ_Q,
          σ_Q,
          M_T,
          Σ_T,
          Q_subseq_isconstant,
          T_subseq_isconstant,
          indices,
          s,
          excl_zone,
      ) = _preprocess_prescrump(
          T_A,
          m,
          T_B=T_B,
          s=s,
          T_A_subseq_isconstant=T_A_subseq_isconstant,
          T_B_subseq_isconstant=T_B_subseq_isconstant,
      )
  
      P, I = _prescrump(
          T_A,
          T_B,
          m,
          μ_Q,
          σ_Q,
          M_T,
          Σ_T,
          Q_subseq_isconstant,
          T_subseq_isconstant,
          indices,
          s,
          excl_zone,
          k,
      )
  
      if k == 1:
          return P.flatten().astype(np.float64), I.flatten().astype(
              np.int64
          )
      else:
          return P, I
  
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 4 for calling a global function with example usage: prescrump(T_A, m, T_B, s, normalize, p, k, T_A_subseq_isconstant, T_B_subseq_isconstant) and returns: P,  I, P,  I