code: def test_prescrump_self_join_KNN_no_overlap():
      # This test is particularly designed to raise error in a rare case described
      # as follows: Let's denote `I[i]` as the array with length `k` that contains
      # the start indices of the best-so-far top-k nearest neighbors of `subseq i`,
      # (`S_i`). Also, we denote `P[i]` as their corresponding distances sorted in
      # ascending order. Let's denote `d` as the distance between `S_i` and `S_j`. P[i]
      # and I[i] must be updated if (1) `j` is not in I[i] and (2) `d` < P[i,-1].
      # Regarding the former condition, one needs to check the whole array I[i]. Checking
      # the array I[i, :idx], where `idx = np.searchsorted(P[i], 'd', side='right')` is
      # not completely correct and that is due to imprecision in numerical calculation.
      # It may happen that `j` is not in `I[i, :idx]`, but it is in fact at `I[i, idx]`
      # (or any other position in array I[i]). And, its corresponding distance, i.e
      # P[i, idx], is d + 1e-5, for instance. In theory, this should be exactly `d`.
      #  However, due to imprecision, we may calculated a slightly different value
      # for such distance in one of previous iterations in function prescrump. This
      #  test results in error if someone tries to change the performant code of prescrump
      # function and check `I[i, :idx]` rather than the full array `I[i]`.
      T = np.array(
          [
              -916.64703784,
              -327.42056679,
              379.19386284,
              -281.80427628,
              -189.85401773,
              -38.69610569,
              187.89889345,
              578.65862523,
              528.09687811,
              -667.42973795,
              -285.27749324,
              -211.28930925,
              -703.93802657,
              -820.53780562,
              -955.91174663,
              383.65471851,
              932.08809422,
              -563.57569746,
              784.0546579,
              -343.14886064,
              -612.72329848,
              -270.09273091,
              -448.39346549,
              578.03202014,
              867.15436674,
              -783.55167049,
              -494.78062922,
              -311.18567747,
              522.70052256,
              933.45474094,
              192.34822368,
              -162.11374908,
              -612.95359279,
              -449.62297051,
              -351.79138459,
              -77.70189101,
              -439.46519487,
              -660.48431174,
              548.69362177,
              485.36004744,
              -535.3566627,
              -568.0955257,
              755.26647273,
              736.1079588,
              -597.65672557,
              379.3299783,
              731.38211912,
              247.34827447,
              545.41888454,
              644.94300763,
              20.99042666,
              788.19859515,
              -898.24325898,
              -929.47841134,
              -738.45875181,
              66.01030291,
              512.945841,
              -44.07720164,
              302.97141464,
              -696.95271302,
              662.98385163,
              -712.3807531,
              -43.62688539,
              74.16927482,
          ]
      )
  
      # test_cases: dict() with `key: value` pair, where key is `(m, k)`, and value
      # is a list of random `seeds`
      test_cases = {
          (3, 2): [4279, 9133, 8190],
          (3, 5): [1267, 4016, 4046],
          (5, 2): [6327, 4926, 3712],
          (5, 5): [3032, 3032, 8117],
      }
      for (m, k), specified_seeds in test_cases.items():
          zone = int(np.ceil(m / 4))
          for seed in specified_seeds:
              np.random.seed(seed)
              ref_P, ref_I = naive.prescrump(
                  T, m, T, s=1, exclusion_zone=zone, k=k
              )
              comp_P, comp_I = prescrump(T, m, s=1, k=k)
  
              npt.assert_almost_equal(ref_P, comp_P)
              npt.assert_almost_equal(ref_I, comp_I)
  
imports: import functools
  import naive
  import numpy
  import numpy.testing
  import pytest
  from stumpy import config, scrump, stump
  from stumpy.scrump import prescrump
label_desc: Use image node_id 33 for calling a global function with example usage: test_prescrump_self_join_KNN_no_overlap() without return types