nodes: 0, module; 1, function_definition; 2, function_name:sortJobs; 3, parameters; 4, block; 5, identifier:jobTypes; 6, identifier:options; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, if_statement; 11, comment:""" Return a jobTypes all sorted.
      """; 12, assignment; 13, assignment; 14, parenthesized_expression; 15, block; 16, elif_clause; 17, elif_clause; 18, identifier:longforms; 19, dictionary; 20, identifier:sortField; 21, subscript; 22, boolean_operator; 23, return_statement; 24, comparison_operator:options.sortCategory == "alpha"; 25, block; 26, comparison_operator:options.sortCategory == "count"; 27, block; 28, pair; 29, pair; 30, pair; 31, pair; 32, pair; 33, identifier:longforms; 34, attribute; 35, boolean_operator; 36, comparison_operator:options.sortCategory == "memory"; 37, call; 38, attribute; 39, string:"alpha"; 40, return_statement; 41, attribute; 42, string:"count"; 43, return_statement; 44, string:"med"; 45, string:"median"; 46, string:"ave"; 47, string:"average"; 48, string:"min"; 49, string:"min"; 50, string:"total"; 51, string:"total"; 52, string:"max"; 53, string:"max"; 54, identifier:options; 55, identifier:sortField; 56, boolean_operator; 57, comparison_operator:options.sortCategory == "wait"; 58, attribute; 59, string:"memory"; 60, identifier:sorted; 61, argument_list; 62, identifier:options; 63, identifier:sortCategory; 64, call; 65, identifier:options; 66, identifier:sortCategory; 67, call; 68, comparison_operator:options.sortCategory == "time"; 69, comparison_operator:options.sortCategory == "clock"; 70, attribute; 71, string:"wait"; 72, identifier:options; 73, identifier:sortCategory; 74, identifier:jobTypes; 75, keyword_argument; 76, keyword_argument; 77, identifier:sorted; 78, argument_list; 79, identifier:sorted; 80, argument_list; 81, attribute; 82, string:"time"; 83, attribute; 84, string:"clock"; 85, identifier:options; 86, identifier:sortCategory; 87, identifier:key; 88, lambda; 89, identifier:reverse; 90, attribute; 91, identifier:jobTypes; 92, keyword_argument; 93, keyword_argument; 94, identifier:jobTypes; 95, keyword_argument; 96, keyword_argument; 97, identifier:options; 98, identifier:sortCategory; 99, identifier:options; 100, identifier:sortCategory; 101, lambda_parameters; 102, call; 103, identifier:options; 104, identifier:sortReverse; 105, identifier:key; 106, lambda; 107, identifier:reverse; 108, attribute; 109, identifier:key; 110, lambda; 111, identifier:reverse; 112, attribute; 113, identifier:tag; 114, identifier:getattr; 115, argument_list; 116, lambda_parameters; 117, attribute; 118, identifier:options; 119, identifier:sortReverse; 120, lambda_parameters; 121, attribute; 122, identifier:options; 123, identifier:sortReverse; 124, identifier:tag; 125, binary_operator:"%s_%s"
                                      % (sortField, options.sortCategory); 126, identifier:tag; 127, identifier:tag; 128, identifier:name; 129, identifier:tag; 130, identifier:tag; 131, identifier:total_number; 132, string:"%s_%s"; 133, tuple; 134, identifier:sortField; 135, attribute; 136, identifier:options; 137, identifier:sortCategory
code: def sortJobs(jobTypes, options):
      """ Return a jobTypes all sorted.
      """
      longforms = {"med": "median",
                   "ave": "average",
                   "min": "min",
                   "total": "total",
                   "max": "max",}
      sortField = longforms[options.sortField]
      if (options.sortCategory == "time" or
          options.sortCategory == "clock" or
          options.sortCategory == "wait" or
          options.sortCategory == "memory"
          ):
          return sorted(
              jobTypes,
              key=lambda tag: getattr(tag, "%s_%s"
                                      % (sortField, options.sortCategory)),
              reverse=options.sortReverse)
      elif options.sortCategory == "alpha":
          return sorted(
              jobTypes, key=lambda tag: tag.name,
              reverse=options.sortReverse)
      elif options.sortCategory == "count":
          return sorted(jobTypes, key=lambda tag: tag.total_number,
                        reverse=options.sortReverse)