code: def naive_aamp_match(Q, T, p, excl_zone, max_distance):
      m = Q.shape[0]
      D = naive.aamp_distance_profile(Q, T, m, p)
  
      # Finds all indices that have a lower distance profile value `D`
      # than `atol + rtol * D`
      matches = []
      for i in range(D.size):
          dist = D[i]
          if dist <= max_distance:
              matches.append(i)
  
      # Removes indices that are inside the exclusion zone of some occurrence with
      # a smaller distance to the query
      matches.sort(key=lambda x: D[x])
      result = []
      while len(matches) > 0:
          o = matches[0]
          result.append([D[o], o])
          matches = [
              x
              for x in matches
              if x < o - excl_zone or x > o + excl_zone
          ]
  
      return np.array(result, dtype=object)
  
file_path: stumpy/tests/test_aamp_motifs.py
imports: import naive
  import numpy
  import numpy.testing
  import pytest
  from stumpy import aamp_match, aamp_motifs, core
label_desc: Use image node_id 1 for calling a global function with example usage: naive_aamp_match(Q, T, p, excl_zone, max_distance) and returns: np