def METHOD_NAME(delta_h, nh, delta_o, no, who, hidden):
    errSum = 0.0
    for j in range(1, 1 + nh):
        Sum = 0.0
        for k in range(1, 1 + no):
            Sum += delta_o[k] * who[j * (1 + no) + k]
        h = hidden[j]
        delta_h[j] = h * (1.0 - h) * Sum
        errSum += abs(delta_h[j])
    return errSum