def METHOD_NAME(img0, img1):
    """
    # Adapted from skimage.registration.phase_cross_correlation
    :param img0: Fixed image.
    :param img1: Translated image.
    :returns: (cross-correlation magnitudes (2D array), shifts)
    """
    # Cache img0 transform, this saves n_classes*(n_nbor-1) transforms
    # Note we use the `id` because ndarray are unhashable
    key = id(img0)
    if key not in __cache:
        __cache[key] = fft.fft2(img0)
    src_f = __cache[key]
    target_f = fft.fft2(img1)
    # Whole-pixel shifts - Compute cross-correlation by an IFFT
    shape = src_f.shape
    image_product = src_f * target_f.conj()
    cross_correlation = fft.ifft2(image_product)
    # Locate maximum
    maxima = np.unravel_index(
        np.argmax(np.abs(cross_correlation)), cross_correlation.shape
    )
    midpoints = np.array([np.fix(axis_size / 2) for axis_size in shape])
    shifts = np.array(maxima, dtype=np.float64)
    shifts[shifts > midpoints] -= np.array(shape)[shifts > midpoints]
    return np.abs(cross_correlation), shifts