def METHOD_NAME(xold, Iold, xnew, Inew):
    # Note: inspired by rebin from OpenGenie, but using counts per bin
    # rather than rates.
    Nold = len(Iold)
    Nnew = len(Inew)
    # Clear the new bins
    for i in range(Nnew):
        Inew[i] = 0
    rebin_counts_portion(Nold, xold, Iold, Nnew, xnew, Inew, 1.)