comefrom: <doocs>2373.Largest Local Values in a Matrix_1.py
code: def largestLocal( grid: List[List[int]]) -> List[List[int]]:
      n = len(grid)
      ans = [[0] * (n - 2) for _ in range(n - 2)]
      for i in range(n - 2):
          for j in range(n - 2):
              ans[i][j] = max(
                  grid[x][y] for x in range(i, i + 3) for y in range(j, j + 3)
              )
      return ans
masked: def sample_funcname ( var_0 : List [ List [ int ] ] ) -> List [ List [ int ] ] :
      var_4 = len ( var_0 )
      var_9 = [ [ 0 ] * ( var_4 - 2 ) for var_7 in range ( var_4 - 2 ) ]
      for var_10 in range ( var_4 - 2 ) :
          for var_11 in range ( var_4 - 2 ) :
              var_9 [ var_10 ] [ var_11 ] = max ( var_0 [ var_15 ] [ var_13 ] for var_15 in range ( var_10 , var_10 + 3 ) for var_13 in range ( var_11 , var_11 + 3 ) )
      return var_9
  