# to see contents of create_data function, look at the top-most algorithm's code
figure, axes, handles = create_plots(data, baselines)
for i, (ax, y) in enumerate(zip(axes, data)):
    if i == 4:
        # few baseline points are identified, so use a higher p value so
        # that other points contribute to fitting; mpls isn't good for
        # signals with positive and negative peaks
        p = 0.1
    else:
        p = 0.001
    baseline, params = baseline_fitter.pspline_mpls(y, lam=lam, p=p)
    ax.plot(baseline, 'g--')