def METHOD_NAME(cc, device="cpu"):
    """
    Zero-padding FFT upsampling. Returns the real IFFT of the input with 2x
    upsampling. This may have an error for matrices with an odd size. Takes
    a complex np array as input.
    """
    if device == "cpu":
        xp = np
    elif device == "gpu":
        xp = cp
    sz = cc.shape
    ups = xp.zeros((sz[0] * 2, sz[1] * 2), dtype=complex)
    ups[: int(np.ceil(sz[0] / 2)), : int(np.ceil(sz[1] / 2))] = cc[
        : int(np.ceil(sz[0] / 2)), : int(np.ceil(sz[1] / 2))
    ]
    ups[-int(np.ceil(sz[0] / 2)) :, : int(np.ceil(sz[1] / 2))] = cc[
        -int(np.ceil(sz[0] / 2)) :, : int(np.ceil(sz[1] / 2))
    ]
    ups[: int(np.ceil(sz[0] / 2)), -int(np.ceil(sz[1] / 2)) :] = cc[
        : int(np.ceil(sz[0] / 2)), -int(np.ceil(sz[1] / 2)) :
    ]
    ups[-int(np.ceil(sz[0] / 2)) :, -int(np.ceil(sz[1] / 2)) :] = cc[
        -int(np.ceil(sz[0] / 2)) :, -int(np.ceil(sz[1] / 2)) :
    ]
    return xp.real(xp.fft.ifft2(ups))