code: def max_killed_enemies(grid):
      if not grid:
          return 0
      m, n = len(grid), len(grid[0])
      max_killed = 0
      row_e, col_e = 0, [0] * n
      # iterates over all cells in the grid
      for i in range(m):
          for j in range(n):
              # makes sure we are next to a wall.
              if j == 0 or grid[i][j - 1] == "W":
                  row_e = row_kills(grid, i, j)
              # makes sure we are next to a wall.
              if i == 0 or grid[i - 1][j] == "W":
                  col_e[j] = col_kills(grid, i, j)
              # makes sure the cell contains a 0
              if grid[i][j] == "0":
                  # updates the variable
                  max_killed = max(max_killed, row_e + col_e[j])
  
      return max_killed
  
file_path: keon-algos/algorithms/matrix/bomb_enemy.py
imports: import unittest
label_desc: Use image node_id 1 for calling a global function with example usage: max_killed_enemies(grid) and returns: max_killed, int