<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scipy_psd(x, f_sample=1.0, nr_segments=4):
 """ PSD routine from scipy we can compare our own numpy result against this one """

    f_axis, psd_of_x = scipy.signal.welch(x, f_sample, nperseg=len(x)/nr_segments)
    return f_axis, psd_of_x