code: def match(vec1, vec2, psd=None, low_frequency_cutoff=None,
            high_frequency_cutoff=None, v1_norm=None, v2_norm=None):
      
  
      htilde = make_frequency_series(vec1)
      stilde = make_frequency_series(vec2)
  
      N = (len(htilde)-1) * 2
  
      global _snr
      if _snr is None or _snr.dtype != htilde.dtype or len(_snr) != N:
          _snr = zeros(N,dtype=complex_same_precision_as(vec1))
      snr, _, snr_norm = matched_filter_core(htilde,stilde,psd,low_frequency_cutoff,
                               high_frequency_cutoff, v1_norm, out=_snr)
      maxsnr, max_id = snr.abs_max_loc()
      if v2_norm is None:
          v2_norm = sigmasq(stilde, psd, low_frequency_cutoff, high_frequency_cutoff)
      return maxsnr * snr_norm / sqrt(v2_norm), max_id
docs: Return the match between the two TimeSeries or FrequencySeries.
  
      Return the match between two waveforms. This is equivelant to the overlap
      maximized over time and phase.
  
      Parameters
      ----------
      vec1 : TimeSeries or FrequencySeries
          The input vector containing a waveform.
      vec2 : TimeSeries or FrequencySeries
          The input vector containing a waveform.
      psd : Frequency Series
          A power spectral density to weight the overlap.
      low_frequency_cutoff : {None, float}, optional
          The frequency to begin the match.
      high_frequency_cutoff : {None, float}, optional
          The frequency to stop the match.
      v1_norm : {None, float}, optional
          The normalization of the first waveform. This is equivalent to its
          sigmasq value. If None, it is internally calculated.
      v2_norm : {None, float}, optional
          The normalization of the second waveform. This is equivalent to its
          sigmasq value. If None, it is internally calculated.
  
      Returns
      -------
      match: float
      index: int
          The number of samples to shift to get the match.