code: def naive_right_mp(
      T, m, normalize=True, p=2.0, T_subseq_isconstant=None
  ):
      # computing `T_subseq_isconstant` boolean array
      T_subseq_isconstant = naive.rolling_isconstant(
          T, m, T_subseq_isconstant
      )
  
      if normalize:
          mp = stump(
              T_A=T, m=m, T_A_subseq_isconstant=T_subseq_isconstant
          )
      else:
          mp = aamp(T, m, p=p)
      k = mp.shape[0]
      right_nn = np.zeros((k, m))
      right_indices = [
          np.arange(IR, IR + m) for IR in mp[:, 3].tolist()
      ]
      right_nn[:] = T[np.array(right_indices)]
      if normalize:
          mp[:, 0] = np.linalg.norm(
              core.z_norm(core.rolling_window(T, m), 1)
              - core.z_norm(right_nn, 1),
              axis=1,
          )
          for i, nn_i in enumerate(mp[:, 3]):
              if T_subseq_isconstant[i] and T_subseq_isconstant[nn_i]:
                  mp[i, 0] = 0
              elif T_subseq_isconstant[i] or T_subseq_isconstant[nn_i]:
                  mp[i, 0] = np.sqrt(m)
              else:  # pragma: no cover
                  pass
      else:
          mp[:, 0] = np.linalg.norm(
              core.rolling_window(T, m) - right_nn, axis=1, ord=p
          )
      inf_indices = np.argwhere(mp[:, 3] < 0).flatten()
      mp[inf_indices, 0] = np.inf
      mp[inf_indices, 3] = inf_indices
  
      return mp
  
imports: import functools
  import naive
  import numpy
  import numpy.testing
  import pytest
  from stumpy import aamp, core, floss, fluss, stump
  from stumpy.floss import _cac, _iac, _nnmark, _rea
label_desc: Use image node_id 4 for calling a global function with example usage: naive_right_mp(T, m, normalize, p, T_subseq_isconstant) and returns: mp