code: def test_stimp_max_m(T):
      threshold = 0.2
      percentage = 0.01
      min_m = 3
      max_m = 5
      n = T.shape[0] - min_m + 1
  
      seed = np.random.randint(100000)
  
      np.random.seed(seed)
      pan = stimp(
          T,
          min_m=min_m,
          max_m=max_m,
          step=1,
          percentage=percentage,
          pre_scrump=True,
          # normalize=True,
      )
  
      for i in range(n):
          pan.update()
  
      ref_PAN = np.full(
          (pan.M_.shape[0], T.shape[0]), fill_value=np.inf
      )
  
      np.random.seed(seed)
      for idx, m in enumerate(pan.M_[:n]):
          zone = int(np.ceil(m / 4))
          s = zone
          tmp_P, tmp_I = naive.prescrump(
              T, m, T, s=s, exclusion_zone=zone
          )
          ref_P, ref_I, _, _ = naive.scrump(
              T, m, T, percentage, zone, True, s
          )
          naive.merge_topk_PI(ref_P, tmp_P, ref_I, tmp_I)
          ref_PAN[pan._bfs_indices[idx], : ref_P.shape[0]] = ref_P
  
      # Compare raw pan
      cmp_PAN = pan._PAN
  
      naive.replace_inf(ref_PAN)
      naive.replace_inf(cmp_PAN)
  
      npt.assert_almost_equal(ref_PAN, cmp_PAN)
  
      # Compare transformed pan
      cmp_pan = pan.PAN_
      ref_pan = naive.transform_pan(
          pan._PAN,
          pan._M,
          threshold,
          pan._bfs_indices,
          pan._n_processed,
      )
  
      naive.replace_inf(ref_pan)
      naive.replace_inf(cmp_pan)
  
      npt.assert_almost_equal(ref_pan, cmp_pan)
  
file_path: stumpy/tests/test_stimp.py
imports: import functools
  import naive
  import numpy
  import numpy.testing
  import pytest
  from dask.distributed import Client, LocalCluster
  from stumpy import stimp, stimped
label_desc: Use image node_id 3 for calling a global function with example usage: test_stimp_max_m(T) without return types