code: def test_aampi_update_constant_subsequence_self_join():
      m = 3
  
      seed = np.random.randint(100000)
      np.random.seed(seed)
      T_full = np.random.rand(64)  # generate random data
      T_full[40:55] = 3  # add constant level interval
  
      T_stream = T_full[:10].copy()
      stream = aampi(T_stream, m, egress=False)
  
      for i in range(len(T_stream), len(T_full)):
          t = T_full[i]
          stream.update(t)
  
      comp_P = stream.P_
  
      ref_mp = naive.aamp(stream.T_, m)
      ref_P = ref_mp[:, 0]
  
      naive.replace_inf(ref_P)
      naive.replace_inf(comp_P)
      npt.assert_almost_equal(ref_P, comp_P)
  
      T_full = pd.Series(T_full)
      T_stream = T_full[:10].copy()
      stream = aampi(T_stream, m, egress=False)
  
      for i in range(len(T_stream), len(T_full)):
          t = T_full[i]
          stream.update(t)
  
      comp_P = stream.P_
  
      naive.replace_inf(comp_P)
      npt.assert_almost_equal(ref_P, comp_P)
  
imports: import naive
  import numpy
  import numpy.testing
  import pandas
  import pytest
  from stumpy import aampi, config, core
label_desc: Use image node_id 10 for calling a global function with example usage: test_aampi_update_constant_subsequence_self_join() without return types