nodes: 0, module; 1, function_definition; 2, function_name:sort_window_ids; 3, parameters; 4, block; 5, identifier:winid_list; 6, default_parameter; 7, expression_statement; 8, import_statement; 9, expression_statement; 10, expression_statement; 11, return_statement; 12, identifier:order; 13, string; 14, comment:"""
          Orders window ids by most recently used
          """; 15, aliased_import; 16, assignment; 17, assignment; 18, identifier:sorted_win_ids; 19, string_content:mru; 20, dotted_name; 21, identifier:ut; 22, identifier:winid_order; 23, call; 24, identifier:sorted_win_ids; 25, call; 26, identifier:utool; 27, attribute; 28, argument_list; 29, attribute; 30, argument_list; 31, identifier:XCtrl; 32, identifier:sorted_window_ids; 33, identifier:order; 34, identifier:ut; 35, identifier:isect; 36, identifier:winid_order; 37, identifier:winid_list
code: def sort_window_ids(winid_list, order='mru'):
          """
          Orders window ids by most recently used
          """
          import utool as ut
          winid_order = XCtrl.sorted_window_ids(order)
          sorted_win_ids = ut.isect(winid_order, winid_list)
          return sorted_win_ids