def METHOD_NAME(t_and_permute):
    toas, ix = t_and_permute
    tcopy = deepcopy(toas)
    tcopy.table = tcopy.table[ix]
    rsort = pint.residuals.Residuals(tcopy, TOAOrderSetup.model, subtract_mean=False)
    assert np.all(TOAOrderSetup.r.time_resids[ix] == rsort.time_resids)