<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fit_fn(distr, xvals, alpha, thresh):
 """ The fitted function normalized to 1 above threshold To normalize to a given total count multiply by the count. Parameters xvals : sequence of floats Values where the function is to be evaluated alpha : float The fitted parameter thresh : float Threshold value applied to fitted values Returns ------- fit : array of floats Fitted function at the requested xvals """

    xvals = numpy.array(xvals)
    fit = fitfn_dict[distr](xvals, alpha, thresh)
    # set fitted values below threshold to 0
    numpy.putmask(fit, xvals < thresh, 0.)
    return fit