docstr: Returns a generator which visits all nodes in physical plan tree.
docstr_tok: ["Returns","a","generator","which","visits","all","nodes","in","physical","plan","tree","."]
code: def walk(self, bfs=True):
      """
      Returns a generator which visits all nodes in physical plan tree.
      """
      if bfs:
          yield from self.bfs()
      else:
          yield from self.dfs()
  
imports: from abc import ABC, abstractmethod
  from collections import deque
  from typing import Any, List
  from evadb.plan_nodes.types import PlanOprType
label_desc: Use image node_id 12 for calling the AbstractPlan obj's underlying member method code with example usage: obj.walk(bfs) without return types