code: def smooth(sig, window_size):
      
      box = np.ones(window_size)/window_size
      return np.convolve(sig, box, mode='same')
docs: Apply a uniform moving average filter to a signal
  
      Parameters
      ----------
      sig : numpy array
          The signal to smooth.
      window_size : int
          The width of the moving average filter.