<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_average_best_span():
 """Figure 2d? from Friedman."""

    N = 200
    num_trials = 400
    avg = numpy.zeros(N)
    for i in range(num_trials):
        x, y = smoother_friedman82.build_sample_smoother_problem_friedman82(N=N)
        my_smoother = smoother.perform_smooth(
            x, y, smoother_cls=supersmoother.SuperSmoother
        )
        avg += my_smoother._smoothed_best_spans.smooth_result
        if not (i + 1) % 20:
            print(i + 1)
    avg /= num_trials
    plt.plot(my_smoother.x, avg, '.', label='Average JCV')
    finish_plot()