nodes: 0, module; 1, function_definition; 2, function_name:print_sorted_counter; 3, parameters; 4, block; 5, identifier:counter; 6, default_parameter; 7, expression_statement; 8, for_statement; 9, identifier:tab; 10, integer:1; 11, comment:"""print all elements of a counter in descending order"""; 12, pattern_list; 13, call; 14, block; 15, identifier:key; 16, identifier:count; 17, identifier:sorted; 18, argument_list; 19, print_statement; 20, call; 21, keyword_argument; 22, keyword_argument; 23, call; 24, attribute; 25, argument_list; 26, identifier:key; 27, call; 28, identifier:reverse; 29, True; 30, attribute; 31, argument_list; 32, identifier:counter; 33, identifier:items; 34, identifier:itemgetter; 35, argument_list; 36, string:"{0}{1} - {2}"; 37, identifier:format; 38, binary_operator:'\t'*tab; 39, identifier:key; 40, identifier:count; 41, integer:1; 42, string; 43, identifier:tab; 44, string_content; 45, escape_sequence:\t
code: def print_sorted_counter(counter, tab=1):
      """print all elements of a counter in descending order"""
      for key, count in sorted(counter.items(), key=itemgetter(1), reverse=True):
          print "{0}{1} - {2}".format('\t'*tab, key, count)