code: def test_aamp_nan_inf_self_join(
      T_A, T_B, substitute_B, substitution_locations
  ):
      m = 3
  
      T_B_sub = T_B.copy()
  
      for substitution_location_B in substitution_locations:
          T_B_sub[:] = T_B[:]
          T_B_sub[substitution_location_B] = substitute_B
  
          ref_mp = naive.aamp(T_B_sub, m)
          comp_mp = aamp(T_B_sub, m, ignore_trivial=True)
          naive.replace_inf(ref_mp)
          naive.replace_inf(comp_mp)
          npt.assert_almost_equal(ref_mp, comp_mp)
  
          comp_mp = aamp(pd.Series(T_B_sub), m, ignore_trivial=True)
          naive.replace_inf(comp_mp)
          npt.assert_almost_equal(ref_mp, comp_mp)
  
file_path: stumpy/tests/test_aamp.py
imports: import naive
  import numpy
  import numpy.testing
  import pandas
  import pytest
  from stumpy import aamp, config
label_desc: Use image node_id 9 for calling a global function with example usage: test_aamp_nan_inf_self_join(T_A, T_B, substitute_B, substitution_locations) without return types