code: def pulse_compression(
      x, template, normalize=False, window=None, nfft=None
  ):
      """
      Pulse Compression is used to increase the range resolution and SNR
      by performing matched filtering of the transmitted pulse (template)
      with the received signal (x)
  
      Parameters
      ----------
      x : ndarray
          Received signal, assume 2D array with [num_pulses, sample_per_pulse]
  
      template : ndarray
          Transmitted signal, assume 1D array
  
      normalize : bool
          Normalize transmitted signal
  
      window : array_like, callable, string, float, or tuple, optional
          Specifies the window applied to the signal in the Fourier
          domain.
  
      nfft : int, size of FFT for pulse compression. Default is number of
          samples per pulse
  
      Returns
      -------
      compressedIQ : ndarray
          Pulse compressed output
      """
      [num_pulses, samples_per_pulse] = x.shape
  
      if nfft is None:
          nfft = samples_per_pulse
  
      if window is not None:
          Nx = len(template)
          if callable(window):
              W = window(cp.fft.fftfreq(Nx))
          elif isinstance(window, cp.ndarray):
              if window.shape != (Nx,):
                  raise ValueError(
                      "window must have the same length as data"
                  )
              W = window
          else:
              W = get_window(window, Nx, False)
  
          template = cp.multiply(template, W)
  
      if normalize is True:
          template = cp.divide(template, cp.linalg.norm(template))
  
      fft_x = cp.fft.fft(x, nfft)
      fft_template = cp.conj(
          cp.tile(cp.fft.fft(template, nfft), (num_pulses, 1))
      )
      compressedIQ = cp.fft.ifft(cp.multiply(fft_x, fft_template), nfft)
  
      return compressedIQ
  
imports: from math import ceil, log2
  import cupy
  from ..windows.windows import get_window
label_desc: Use image node_id 1 for calling a global function with example usage: pulse_compression(x, template, normalize, window, nfft) and returns: compressedIQ