code: def for_each_child(node, callback):
      
      for name in node._fields:
          value = getattr(node, name)
          if isinstance(value, list):
              for item in value:
                  if isinstance(item, ast.AST):
                      callback(item)
          elif isinstance(value, ast.AST):
              callback(value)
docs: Calls the callback for each AST node that's a child of the given node.