code: 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
docs: Patches the given node
  
      After calling, each node in `node` will have a new field named
      `region` that is a tuple containing the start and end offsets
      of the code that generated it.
  
      If `sorted_children` is true, a `sorted_children` field will
      be created for each node, too.  It is a list containing child
      nodes as well as whitespaces and comments that occur between
      them.