def is_inside(x, y, window):
    """
    Check if (x, y) is a valid coordinate in input window

    Args:
        x (int): x-coordinate
        y (int): y-coordinate
        window (face_spinner.Window): Window

    Returns:
        bool -> True if valid, False otherwise
    """
    if window.x <= x < (window.x + window.w) and window.y <= y < (window.y + window.h):
        return True
    else:
        return False