code: def dfs(self, r, grid, visited):
      visited.append(r)
      for j in range(len(grid)):
          if grid[r][j] == 1 and j not in visited:
              self.dfs(j, grid, visited)
  
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.dfs(r, grid, visited) without return types