code: def test_stumpi_profile_index_match():
      T_full = np.random.rand(64)
      m = 3
      T_full_subseq = core.rolling_window(T_full, m)
      warm_start = 8
  
      T_stream = T_full[:warm_start].copy()
      stream = stumpi(T_stream, m, egress=True)
      P = np.full_like(stream.P_, np.inf, dtype=np.float64)
      left_P = np.full_like(stream.left_P_, np.inf, dtype=np.float64)
  
      n = 0
      for i in range(len(T_stream), len(T_full)):
          t = T_full[i]
          stream.update(t)
  
          P[:] = np.inf
          indices = np.argwhere(stream.I_ >= 0).flatten()
          P[indices] = naive.distance(
              naive.z_norm(T_full_subseq[indices + n + 1], axis=1),
              naive.z_norm(T_full_subseq[stream.I_[indices]], axis=1),
              axis=1,
          )
  
          left_P[:] = np.inf
          indices = np.argwhere(stream.left_I_ >= 0).flatten()
          left_P[indices] = naive.distance(
              naive.z_norm(T_full_subseq[indices + n + 1], axis=1),
              naive.z_norm(
                  T_full_subseq[stream.left_I_[indices]], axis=1
              ),
              axis=1,
          )
  
          npt.assert_almost_equal(stream.P_, P)
          npt.assert_almost_equal(stream.left_P_, left_P)
  
          n += 1
  
imports: import functools
  import naive
  import numpy
  import numpy.testing
  import pandas
  import pytest
  from stumpy import config, core, stumpi
label_desc: Use image node_id 12 for calling a global function with example usage: test_stumpi_profile_index_match() without return types