def METHOD_NAME(shift):
    # shift, apply function, inverse shift
    xs = np.roll(x, shift, axis=roll_axes)
    tmp = func(xs, **func_kw)
    return np.roll(tmp, tuple(-s for s in shift), axis=roll_axes)