def iter_child_nodes(node):
 for (name, field) in iter_fields(node):
  if isinstance(field, AST):
   (yield field)
  elif isinstance(field, list):
   for item in field:
    if isinstance(item, AST):
     (yield item)

def iter_child_nodes ( node ) : for ( name , field ) in iter_fields ( node ) : if isinstance ( field , AST ) : ( yield field ) elif isinstance ( field , list ) : for item in field : if isinstance ( item , AST ) : ( yield item )
iterate over all child nodes or a node .