def is_valid(puzzle, guess, row, col) -> bool:
    """
    Determines whether the guess at the row/col is valid or not
    :param puzzle:
    :param guess:
    :param row:
    :param col:
    :return: bool
    """
    row_val = puzzle[row]
    if guess in row_val:
        return False
    col_val = [puzzle[i][col] for i in range(9)]
    if guess in col_val:
        return False

    # now we want to get where the 3x3 square starts
    # and iterate over the 3 values in the row/column
    row_start = (row // 3) * 3
    col_start = (col // 3) * 3

    for r in range(row_start, row_start + 3):
        for c in range(col_start, col_start + 3):
            if puzzle[r][c] == guess:
                return False
    # now if all the checks pass
    return True