def METHOD_NAME(x, fs, plot=False):
    f, t, Sxx = signal.spectrogram(x, fs, nfft=x.shape[0])
    Sxx = np.abs(Sxx)
    if plot:
        plt.pcolormesh(t, f, Sxx, shading="gouraud")
        plt.ylabel("Frequency [Hz]")
        plt.xlabel("Time [sec]")
        plt.show()
    return Sxx