nodes: 0, module; 1, function_definition; 2, function_name:deepvalues; 3, parameters; 4, block; 5, identifier:mapping; 6, expression_statement; 7, expression_statement; 8, for_statement; 9, comment:"""Iterates over nested mapping, depth-first, in sorted order by key."""; 10, assignment; 11, identifier:obj; 12, identifier:values; 13, block; 14, identifier:values; 15, call; 16, expression_statement; 17, try_statement; 18, if_statement; 19, identifier:vals_sorted_by_key; 20, argument_list; 21, assignment; 22, block; 23, except_clause; 24, else_clause; 25, not_operator; 26, block; 27, identifier:mapping; 28, identifier:mapping; 29, False; 30, expression_statement; 31, identifier:AttributeError; 32, block; 33, block; 34, identifier:mapping; 35, expression_statement; 36, attribute; 37, pass_statement; 38, expression_statement; 39, for_statement; 40, yield; 41, identifier:obj; 42, identifier:items; 43, assignment; 44, identifier:subobj; 45, call; 46, block; 47, identifier:obj; 48, identifier:mapping; 49, True; 50, identifier:deepvalues; 51, argument_list; 52, expression_statement; 53, identifier:obj; 54, yield; 55, identifier:subobj
code: def deepvalues(mapping):
      """Iterates over nested mapping, depth-first, in sorted order by key."""
      values = vals_sorted_by_key(mapping)
      for obj in values:
          mapping = False
          try:
              obj.items
          except AttributeError:
              pass
          else:
              mapping = True
              for subobj in deepvalues(obj):
                  yield subobj
          if not mapping:
              yield obj