nodes: 0, module; 1, function_definition; 2, function_name:iteritems_sorted; 3, parameters; 4, block; 5, identifier:dict_; 6, expression_statement; 7, if_statement; 8, comment:""" change to iteritems ordered """; 9, call; 10, block; 11, else_clause; 12, identifier:isinstance; 13, argument_list; 14, return_statement; 15, block; 16, identifier:dict_; 17, identifier:OrderedDict; 18, call; 19, return_statement; 20, attribute; 21, argument_list; 22, call; 23, identifier:six; 24, identifier:iteritems; 25, identifier:dict_; 26, identifier:iter; 27, argument_list; 28, call; 29, identifier:sorted; 30, argument_list; 31, call; 32, attribute; 33, argument_list; 34, identifier:six; 35, identifier:iteritems; 36, identifier:dict_
code: def iteritems_sorted(dict_):
      """ change to iteritems ordered """
      if isinstance(dict_, OrderedDict):
          return six.iteritems(dict_)
      else:
          return iter(sorted(six.iteritems(dict_)))