nodes: 0, module; 1, function_definition; 2, function_name:get_patched_ast; 3, parameters; 4, block; 5, identifier:source; 6, default_parameter; 7, expression_statement; 8, return_statement; 9, identifier:sorted_children; 10, False; 11, comment:"""Adds ``region`` and ``sorted_children`` fields to nodes
  
      Adds ``sorted_children`` field only if `sorted_children` is True.
  
      """; 12, call; 13, identifier:patch_ast; 14, argument_list; 15, call; 16, identifier:source; 17, identifier:sorted_children; 18, attribute; 19, argument_list; 20, identifier:ast; 21, identifier:parse; 22, identifier:source
code: def get_patched_ast(source, sorted_children=False):
      """Adds ``region`` and ``sorted_children`` fields to nodes
  
      Adds ``sorted_children`` field only if `sorted_children` is True.
  
      """
      return patch_ast(ast.parse(source), source, sorted_children)