from typing import Tuple


def compute_patch_y_offset(patchXSize: Tuple, patchYSize: Tuple,
                           patchInnerStride: Tuple, predictionDelay: int) -> Tuple:
    """
    Compute the offset of the Y-patch relative to the X-patch.
    """
    patchYOffset = [0] * len(patchXSize)
    for dim in range(len(patchXSize)):
        if dim == 0:
            patchYOffset[dim] = (patchXSize[dim] - 1) * patchInnerStride[dim] + predictionDelay
        else:
            patchYOffset[dim] = int(patchXSize[dim] / 2) * patchInnerStride[dim] - int(patchYSize[dim] / 2)

    return tuple(patchYOffset)