nodes: 0, module; 1, function_definition; 2, function_name:monitor; 3, parameters; 4, block; 5, identifier:args; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, function_definition; 13, comment:# FIXME: this will generally return different column order between Python 2/3; 14, return_statement; 15, string; 16, assignment; 17, call; 18, assignment; 19, assignment; 20, assignment; 21, function_name:expander; 22, parameters; 23, block; 24, binary_operator:[header] + ['\t'.join( map(expander, v.values())) for v in statuses]; 25, string_content:Retrieve status of jobs submitted from a given workspace, as a list
          of TSV lines sorted by descending order of job submission date; 26, identifier:r; 27, call; 28, attribute; 29, argument_list; 30, identifier:statuses; 31, call; 32, identifier:header; 33, call; 34, identifier:expander; 35, lambda; 36, identifier:thing; 37, if_statement; 38, return_statement; 39, list; 40, list_comprehension; 41, attribute; 42, argument_list; 43, identifier:fapi; 44, identifier:_check_response_code; 45, identifier:r; 46, integer:200; 47, identifier:sorted; 48, argument_list; 49, attribute; 50, argument_list; 51, lambda_parameters; 52, call; 53, call; 54, block; 55, call; 56, identifier:header; 57, call; 58, for_in_clause; 59, identifier:fapi; 60, identifier:list_submissions; 61, attribute; 62, attribute; 63, call; 64, keyword_argument; 65, keyword_argument; 66, string; 67, identifier:join; 68, call; 69, identifier:v; 70, attribute; 71, argument_list; 72, identifier:isinstance; 73, argument_list; 74, expression_statement; 75, if_statement; 76, attribute; 77, argument_list; 78, attribute; 79, argument_list; 80, identifier:v; 81, identifier:statuses; 82, identifier:args; 83, identifier:project; 84, identifier:args; 85, identifier:workspace; 86, attribute; 87, argument_list; 88, identifier:key; 89, lambda; 90, identifier:reverse; 91, True; 92, string_content; 93, identifier:list; 94, argument_list; 95, string; 96, identifier:format; 97, identifier:v; 98, identifier:thing; 99, identifier:dict; 100, assignment; 101, identifier:entityType; 102, block; 103, string:"{0}"; 104, identifier:format; 105, identifier:thing; 106, string; 107, identifier:join; 108, call; 109, identifier:r; 110, identifier:json; 111, lambda_parameters; 112, subscript; 113, escape_sequence:\t; 114, call; 115, string_content:{0}; 116, identifier:entityType; 117, call; 118, return_statement; 119, string_content; 120, identifier:map; 121, argument_list; 122, identifier:k; 123, identifier:k; 124, string; 125, attribute; 126, argument_list; 127, attribute; 128, argument_list; 129, call; 130, escape_sequence:\t; 131, identifier:expander; 132, call; 133, string_content:submissionDate; 134, subscript; 135, identifier:keys; 136, identifier:thing; 137, identifier:get; 138, string:"entityType"; 139, None; 140, attribute; 141, argument_list; 142, attribute; 143, argument_list; 144, identifier:statuses; 145, integer:0; 146, string:"{0}:{1}"; 147, identifier:format; 148, identifier:entityType; 149, subscript; 150, identifier:v; 151, identifier:values; 152, identifier:thing; 153, string; 154, string_content:entityName
code: def monitor(args):
      ''' Retrieve status of jobs submitted from a given workspace, as a list
          of TSV lines sorted by descending order of job submission date'''
      r = fapi.list_submissions(args.project, args.workspace)
      fapi._check_response_code(r, 200)
      statuses = sorted(r.json(), key=lambda k: k['submissionDate'], reverse=True)
      header = '\t'.join(list(statuses[0].keys()))
      expander = lambda v: '{0}'.format(v)
  
      def expander(thing):
          if isinstance(thing, dict):
              entityType = thing.get("entityType", None)
              if entityType:
                  return "{0}:{1}".format(entityType, thing['entityName'])
          return "{0}".format(thing)
  
      # FIXME: this will generally return different column order between Python 2/3
      return [header] + ['\t'.join( map(expander, v.values())) for v in statuses]