def y_in_process(coord2d: list, y_coord: int, ly: int, processes_in_y: int) -> bool:
    """
    Checks whether a global y coordinate is in a given process or not.

    Args:
        coord2d: process coordinates given the cartesian topology
        x_coord: global y coordinate
        lx: size of the lattice grid in y direction
        processes_in_x: number of processes in y direction

    Returns:
        boolean whether global y coordinate is in given process or not

    """
    lower = coord2d[1] * (ly // processes_in_y)
    upper = (coord2d[1] + 1) * (ly // processes_in_y) - 1 if not coord2d[1] == processes_in_y - 1 else ly - 1
    return lower <= y_coord <= upper