code: def normalized_cc(s1, s2, norm1=-1.0, norm2=-1.0):
      """Normalize cc.
  
      Parameters
      ----------
      s1 : array-like, shape=(sz, d), dtype=float64
          A time series.
      s2 : array-like, shape=(sz, d), dtype=float64
          Another time series.
      norm1 : float64, default=-1.0
      norm2 : float64, default=-1.0
  
      Returns
      -------
      norm_cc : array-like, shape=(2 * sz - 1), dtype=float64
      """
      assert s1.shape[1] == s2.shape[1]
      sz = s1.shape[0]
      n_bits = 1 + int(np.log2(2 * sz - 1))
      fft_sz = 2**n_bits
  
      if norm1 < 0.0:
          norm1 = np.linalg.norm(s1)
      if norm2 < 0.0:
          norm2 = np.linalg.norm(s2)
  
      denom = norm1 * norm2
      if denom < 1e-9:  # To avoid NaNs
          denom = np.inf
  
      with objmode(cc="float64[:, :]"):
          cc = np.real(
              np.fft.ifft(
                  np.fft.fft(s1, fft_sz, axis=0)
                  * np.conj(np.fft.fft(s2, fft_sz, axis=0)),
                  axis=0,
              )
          )
      cc = np.vstack((cc[-(sz - 1) :], cc[:sz]))
      norm_cc = np.real(cc).sum(axis=-1) / denom
      return norm_cc
  
imports: import numpy
  from numba import njit, objmode, prange
label_desc: Use image node_id 1 for calling a global function with example usage: normalized_cc(s1, s2, norm1, norm2) and returns: norm_cc