def METHOD_NAME(fast):
    true_shifts = np.array([2, 4])
    frame, templ, nans = gen_frame_n_templ(true_shifts)
    if fast:
        frame_cor, shifts = motion_correct_iteration_fast(frame, templ, 4, 4)
    else:
        frame_cor, _, shifts, _ = motion_correct_iteration(frame, templ, 1, 4, 4)
    npt.assert_allclose(shifts, -true_shifts)
    npt.assert_allclose(np.corrcoef(frame_cor[~nans].ravel(), templ[~nans].ravel())[0, 1], 1)