code: def test_aampi_constant_subsequence_self_join():
      m = 3
  
      seed = np.random.randint(100000)
      np.random.seed(seed)
  
      T = np.concatenate(
          (
              np.zeros(20, dtype=np.float64),
              np.ones(10, dtype=np.float64),
          )
      )
      stream = aampi(T, m, egress=False)
      for i in range(34):
          t = np.random.rand()
          stream.update(t)
  
      comp_P = stream.P_
      # comp_I = stream.I_
  
      ref_mp = naive.aamp(stream.T_, m)
      ref_P = ref_mp[:, 0]
      # ref_I = ref_mp[:, 1]
  
      naive.replace_inf(ref_P)
      naive.replace_inf(comp_P)
  
      npt.assert_almost_equal(ref_P, comp_P)
      # npt.assert_almost_equal(ref_I, comp_I)
  
      np.random.seed(seed)
      T = np.concatenate(
          (
              np.zeros(20, dtype=np.float64),
              np.ones(10, dtype=np.float64),
          )
      )
      T = pd.Series(T)
      stream = aampi(T, m, egress=False)
      for i in range(34):
          t = np.random.rand()
          stream.update(t)
  
      comp_P = stream.P_
      # comp_I = stream.I_
  
      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 8 for calling a global function with example usage: test_aampi_constant_subsequence_self_join() without return types