<garvit244>289_1.py
def around(i, j, board):
    count = 0
    for k in range(i-1, i+2):
        for l in range(j-1, j+2):
            if 0<=k < len(board) and 0 <= l < len(board[0]):
                if board[k][l] == 1:
                    count += 1
                    
    return count-1 if board[i][j] == 1 else count
def sample_funcname ( var_0 , var_1 , var_2 ) :
    var_4 = 0
    for var_8 in range ( var_0 - 1 , var_0 + 2 ) :
        for var_9 in range ( var_1 - 1 , var_1 + 2 ) :
            if 0 <= var_8 < len ( var_2 ) and 0 <= var_9 < len ( var_2 [ 0 ] ) :
                if var_2 [ var_8 ] [ var_9 ] == 1 :
                    var_4 += 1
    return var_4 - 1 if var_2 [ var_0 ] [ var_1 ] == 1 else var_4
