code: def dfs(rooms, i, j, depth):
      if (i < 0 or i >= len(rooms)) or (j < 0 or j >= len(rooms[0])):
          return  # out of bounds
      if rooms[i][j] < depth:
          return  # crossed
      rooms[i][j] = depth
      dfs(rooms, i + 1, j, depth + 1)
      dfs(rooms, i - 1, j, depth + 1)
      dfs(rooms, i, j + 1, depth + 1)
      dfs(rooms, i, j - 1, depth + 1)
  
label_desc: Use image node_id 2 for calling a global function with example usage: dfs(rooms, i, j, depth) without return types