nodes: 0, module; 1, function_definition; 2, function_name:sort_args; 3, parameters; 4, block; 5, identifier:args; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, for_statement; 10, return_statement; 11, comment:"""Put flags at the end"""; 12, assignment; 13, assignment; 14, identifier:i; 15, identifier:flags; 16, block; 17, binary_operator:args + flags; 18, identifier:args; 19, call; 20, identifier:flags; 21, list_comprehension; 22, expression_statement; 23, identifier:args; 24, identifier:flags; 25, attribute; 26, argument_list; 27, identifier:i; 28, for_in_clause; 29, if_clause; 30, call; 31, identifier:args; 32, identifier:copy; 33, identifier:i; 34, identifier:args; 35, call; 36, attribute; 37, argument_list; 38, attribute; 39, argument_list; 40, identifier:args; 41, identifier:remove; 42, identifier:i; 43, identifier:FLAGS_RE; 44, identifier:match; 45, subscript; 46, identifier:i; 47, integer:1
code: def sort_args(args):
      """Put flags at the end"""
      args = args.copy()
      flags = [i for i in args if FLAGS_RE.match(i[1])]
  
      for i in flags:
          args.remove(i)
  
      return args + flags