def METHOD_NAME(data, shifts1, shifts2, order=1):
    """
    Register 5D data set using affine transformation
     Parameters
    ----------
    data: np.array or dask.array
        Input image in 5D array (time * rx * ry * kx * ky)
    shifts1: np.array
        1D array for shifts in 1st real space direction or x in hyperspy indexing.
    shifts2: np.array
        1D array for shifts in 2nd real space direction or y in hyperspy indexing.
    order: int
        The order of the spline interpolation for affine transformation. Default
        is 1, has to be in the range 0-5
    Returns
    -------
    data_t: np.array
        5D array after translation according to shift vectors
    """
    data_t = np.zeros_like(data)
    time_size = len(shifts1)
    for i in range(time_size):
        data_t[i, :, :, :, :] = ndi.affine_transform(
            data[i, :, :, :, :],
            np.identity(4),
            offset=(shifts1[i][0, 0, 0, 0], shifts2[i][0, 0, 0, 0], 0, 0),
            order=order,
        )
    return data_t