nodes: 0, module; 1, function_definition; 2, function_name:get_document_summary; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, expression_statement; 11, if_statement; 12, if_statement; 13, expression_statement; 14, for_statement; 15, return_statement; 16, identifier:N; 17, None; 18, identifier:cite_sort; 19, True; 20, identifier:refresh; 21, True; 22, comment:"""Return a summary string of documents.
  
          Parameters
          ----------
          N : int or None (optional, default=None)
              Maximum number of documents to include in the summary.
              If None, return all documents.
  
          cite_sort : bool (optional, default=True)
              Whether to sort xml by number of citations, in decreasing order,
              or not.
  
          refresh : bool (optional, default=True)
              Whether to refresh the cached abstract file (if it exists) or not.
  
          Returns
          -------
          s : str
              Text summarizing an author's documents.
          """; 23, assignment; 24, identifier:cite_sort; 25, block; 26, comparison_operator:N is None; 27, block; 28, assignment; 29, identifier:i; 30, call; 31, block; 32, call; 33, identifier:abstracts; 34, call; 35, expression_statement; 36, expression_statement; 37, expression_statement; 38, identifier:N; 39, None; 40, expression_statement; 41, identifier:s; 42, list; 43, identifier:range; 44, argument_list; 45, expression_statement; 46, attribute; 47, argument_list; 48, attribute; 49, argument_list; 50, assignment; 51, call; 52, assignment; 53, assignment; 54, call; 55, identifier:N; 56, augmented_assignment; 57, string; 58, identifier:join; 59, identifier:s; 60, identifier:self; 61, identifier:get_abstracts; 62, keyword_argument; 63, identifier:counts; 64, list_comprehension; 65, attribute; 66, argument_list; 67, identifier:abstracts; 68, list_comprehension; 69, identifier:N; 70, call; 71, attribute; 72, argument_list; 73, identifier:s; 74, list; 75, string_content; 76, identifier:refresh; 77, identifier:refresh; 78, tuple; 79, for_in_clause; 80, identifier:counts; 81, identifier:sort; 82, keyword_argument; 83, keyword_argument; 84, subscript; 85, for_in_clause; 86, identifier:len; 87, argument_list; 88, string; 89, identifier:format; 90, identifier:N; 91, call; 92, call; 93, escape_sequence:\n; 94, identifier:a; 95, call; 96, identifier:a; 97, identifier:abstracts; 98, identifier:reverse; 99, True; 100, identifier:key; 101, call; 102, identifier:a; 103, integer:0; 104, identifier:a; 105, identifier:counts; 106, identifier:abstracts; 107, string_content:{0} of {1} documents; 108, identifier:len; 109, argument_list; 110, attribute; 111, argument_list; 112, identifier:int; 113, argument_list; 114, identifier:itemgetter; 115, argument_list; 116, identifier:abstracts; 117, string; 118, identifier:format; 119, binary_operator:i + 1; 120, call; 121, attribute; 122, integer:1; 123, string_content; 124, identifier:i; 125, integer:1; 126, identifier:str; 127, argument_list; 128, identifier:a; 129, identifier:citedby_count; 130, escape_sequence:\n; 131, subscript; 132, identifier:abstracts; 133, identifier:i
code: def get_document_summary(self, N=None, cite_sort=True, refresh=True):
          """Return a summary string of documents.
  
          Parameters
          ----------
          N : int or None (optional, default=None)
              Maximum number of documents to include in the summary.
              If None, return all documents.
  
          cite_sort : bool (optional, default=True)
              Whether to sort xml by number of citations, in decreasing order,
              or not.
  
          refresh : bool (optional, default=True)
              Whether to refresh the cached abstract file (if it exists) or not.
  
          Returns
          -------
          s : str
              Text summarizing an author's documents.
          """
          abstracts = self.get_abstracts(refresh=refresh)
  
          if cite_sort:
              counts = [(a, int(a.citedby_count)) for a in abstracts]
              counts.sort(reverse=True, key=itemgetter(1))
              abstracts = [a[0] for a in counts]
  
          if N is None:
              N = len(abstracts)
  
          s = [u'{0} of {1} documents'.format(N, len(abstracts))]
  
          for i in range(N):
              s += ['{0:2d}. {1}\n'.format(i + 1, str(abstracts[i]))]
  
          return '\n'.join(s)