nodes: 0, module; 1, function_definition; 2, function_name:reverse_post_order_sort_nodes; 3, parameters; 4, block; 5, identifier:graph; 6, default_parameter; 7, expression_statement; 8, expression_statement; 9, if_statement; 10, expression_statement; 11, for_statement; 12, return_statement; 13, identifier:nodes; 14, None; 15, comment:"""
          Sort a given set of nodes in reverse post ordering.
  
          :param networkx.DiGraph graph: A local transition graph of a function.
          :param iterable nodes: A collection of nodes to sort.
          :return: A list of sorted nodes.
          :rtype: list
          """; 16, assignment; 17, comparison_operator:nodes is None; 18, block; 19, assignment; 20, pattern_list; 21, call; 22, block; 23, call; 24, identifier:post_order; 25, call; 26, identifier:nodes; 27, None; 28, return_statement; 29, identifier:addrs_to_index; 30, dictionary; 31, identifier:i; 32, identifier:n; 33, identifier:enumerate; 34, argument_list; 35, expression_statement; 36, identifier:sorted; 37, argument_list; 38, attribute; 39, argument_list; 40, call; 41, identifier:post_order; 42, assignment; 43, identifier:nodes; 44, keyword_argument; 45, keyword_argument; 46, identifier:networkx; 47, identifier:dfs_postorder_nodes; 48, identifier:graph; 49, identifier:reversed; 50, argument_list; 51, subscript; 52, identifier:i; 53, identifier:key; 54, lambda; 55, identifier:reverse; 56, True; 57, call; 58, identifier:addrs_to_index; 59, attribute; 60, lambda_parameters; 61, subscript; 62, identifier:list; 63, argument_list; 64, identifier:n; 65, identifier:addr; 66, identifier:n; 67, identifier:addrs_to_index; 68, attribute; 69, identifier:post_order; 70, identifier:n; 71, identifier:addr
code: def reverse_post_order_sort_nodes(graph, nodes=None):
          """
          Sort a given set of nodes in reverse post ordering.
  
          :param networkx.DiGraph graph: A local transition graph of a function.
          :param iterable nodes: A collection of nodes to sort.
          :return: A list of sorted nodes.
          :rtype: list
          """
  
          post_order = networkx.dfs_postorder_nodes(graph)
  
          if nodes is None:
              return reversed(list(post_order))
  
          addrs_to_index = {}
          for i, n in enumerate(post_order):
              addrs_to_index[n.addr] = i
          return sorted(nodes, key=lambda n: addrs_to_index[n.addr], reverse=True)