def get_candidates(row_no, col_no, 
                        row_candidates, col_candidates, square_candidates):
    """
    Gets possible candidates for a square with 3-way set intersection of its
    row, col and encompassing square sets
    """
    candidates = row_candidates[row_no] & col_candidates[col_no] & \
                square_candidates[row_no // 3][col_no // 3]

    return candidates