nodes: 0, module; 1, function_definition; 2, function_name:sort_top_targets; 3, parameters; 4, block; 5, identifier:self; 6, identifier:top; 7, identifier:orders; 8, expression_statement; 9, expression_statement; 10, comment:# pylint: disable=cell-var-from-loop; 11, for_statement; 12, comment:# pylint: enable=cell-var-from-loop; 13, return_statement; 14, string; 15, assignment; 16, pattern_list; 17, call; 18, block; 19, identifier:sorted_top; 20, string_content:Returns the sorted high data from the merged top files; 21, identifier:sorted_top; 22, call; 23, identifier:saltenv; 24, identifier:targets; 25, attribute; 26, argument_list; 27, expression_statement; 28, for_statement; 29, attribute; 30, argument_list; 31, identifier:six; 32, identifier:iteritems; 33, identifier:top; 34, assignment; 35, identifier:target; 36, identifier:sorted_targets; 37, block; 38, identifier:collections; 39, identifier:defaultdict; 40, identifier:OrderedDict; 41, identifier:sorted_targets; 42, call; 43, expression_statement; 44, identifier:sorted; 45, argument_list; 46, assignment; 47, identifier:targets; 48, keyword_argument; 49, subscript; 50, subscript; 51, identifier:key; 52, lambda; 53, subscript; 54, identifier:target; 55, identifier:targets; 56, identifier:target; 57, lambda_parameters; 58, subscript; 59, identifier:sorted_top; 60, identifier:saltenv; 61, identifier:target; 62, subscript; 63, identifier:target; 64, identifier:orders; 65, identifier:saltenv
code: def sort_top_targets(self, top, orders):
          '''
          Returns the sorted high data from the merged top files
          '''
          sorted_top = collections.defaultdict(OrderedDict)
          # pylint: disable=cell-var-from-loop
          for saltenv, targets in six.iteritems(top):
              sorted_targets = sorted(targets,
                      key=lambda target: orders[saltenv][target])
              for target in sorted_targets:
                  sorted_top[saltenv][target] = targets[target]
          # pylint: enable=cell-var-from-loop
          return sorted_top