code: def calc_fft(signal, fs):
      """This functions computes the fft of a signal.
  
      Parameters
      ----------
      signal : nd-array
          The input signal from which fft is computed
      fs : float
          Sampling frequency
  
      Returns
      -------
      f: nd-array
          Frequency values (xx axis)
      fmag: nd-array
          Amplitude of the frequency values (yy axis)
  
      """
  
      fmag = np.abs(np.fft.rfft(signal))
      f = np.fft.rfftfreq(len(signal), d=1 / fs)
  
      return f.copy(), fmag.copy()
  
file_path: tsfel/tsfel/feature_extraction/features_utils.py
imports: import scipy
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: calc_fft(signal, fs) and returns: f,  fmag