code: def plot_signal(x, offset):
      """Plot a signal."""
      t = np.arange(len(x)) / sfreq
      axes[0].plot(t, x + offset)
      axes[0].set(xlabel="Time (s)", xlim=t[[0, -1]])
      X = fft(x)
      freqs = fftfreq(len(x), 1.0 / sfreq)
      mask = freqs >= 0
      X = X[mask]
      freqs = freqs[mask]
      axes[1].plot(freqs, 20 * np.log10(np.maximum(np.abs(X), 1e-16)))
      axes[1].set(xlim=flim)
  
file_path: mne-python/tutorials/preprocessing/25_background_filtering.py
imports: import matplotlib.pyplot
  import numpy
  from numpy.fft import fft, fftfreq
  from scipy import signal
  import mne
  from mne.time_frequency.tfr import morlet
  from mne.viz import plot_filter, plot_ideal_filter
label_desc: Use image node_id 1 for calling a global function with example usage: plot_signal(x, offset) without return types