def patch_ast(node, source, sorted_children=False):
 if hasattr(node, 'region'):
  return node
 walker = _PatchingASTWalker(source, children=sorted_children)
 ast.call_for_nodes(node, walker)
 return node

def patch_ast ( node , source , sorted_children = False ) : if hasattr ( node , 'region' ) : return node walker = _PatchingASTWalker ( source , children = sorted_children ) ast . call_for_nodes ( node , walker ) return node
patches the given node after calling .