nodes: 0, module; 1, function_definition; 2, function_name:pprint_blockers; 3, parameters; 4, block; 5, identifier:blockers; 6, expression_statement; 7, expression_statement; 8, for_statement; 9, return_statement; 10, comment:"""Pretty print blockers into a sequence of strings.
  
      Results will be sorted by top-level project name. This means that if a
      project is blocking another project then the dependent project will be
      what is used in the sorting, not the project at the bottom of the
      dependency graph.
  
      """; 11, assignment; 12, identifier:blocker; 13, call; 14, block; 15, identifier:pprinted; 16, identifier:pprinted; 17, list; 18, identifier:sorted; 19, argument_list; 20, expression_statement; 21, if_statement; 22, expression_statement; 23, identifier:blockers; 24, keyword_argument; 25, assignment; 26, comparison_operator:len(blocker) > 1; 27, block; 28, call; 29, identifier:key; 30, lambda; 31, identifier:buf; 32, list; 33, call; 34, integer:1; 35, expression_statement; 36, expression_statement; 37, expression_statement; 38, attribute; 39, argument_list; 40, lambda_parameters; 41, call; 42, subscript; 43, identifier:len; 44, argument_list; 45, call; 46, call; 47, call; 48, identifier:pprinted; 49, identifier:append; 50, call; 51, identifier:x; 52, identifier:tuple; 53, argument_list; 54, identifier:blocker; 55, integer:0; 56, identifier:blocker; 57, attribute; 58, argument_list; 59, attribute; 60, argument_list; 61, attribute; 62, argument_list; 63, attribute; 64, argument_list; 65, call; 66, identifier:buf; 67, identifier:append; 68, string; 69, identifier:buf; 70, identifier:append; 71, call; 72, identifier:buf; 73, identifier:append; 74, string; 75, string; 76, identifier:join; 77, identifier:buf; 78, identifier:reversed; 79, argument_list; 80, string_content:(which is blocking; 81, attribute; 82, argument_list; 83, string_content:); 84, identifier:x; 85, string; 86, identifier:join; 87, subscript; 88, string_content:, which is blocking; 89, identifier:blocker; 90, slice; 91, integer:1
code: def pprint_blockers(blockers):
      """Pretty print blockers into a sequence of strings.
  
      Results will be sorted by top-level project name. This means that if a
      project is blocking another project then the dependent project will be
      what is used in the sorting, not the project at the bottom of the
      dependency graph.
  
      """
      pprinted = []
      for blocker in sorted(blockers, key=lambda x: tuple(reversed(x))):
          buf = [blocker[0]]
          if len(blocker) > 1:
              buf.append(' (which is blocking ')
              buf.append(', which is blocking '.join(blocker[1:]))
              buf.append(')')
          pprinted.append(''.join(buf))
      return pprinted