nodes: 0, module; 1, function_definition; 2, function_name:group; 3, parameters; 4, block; 5, identifier:iterable; 6, identifier:key; 7, expression_statement; 8, for_statement; 9, comment:"""
      groupby which sorts the input, discards the key and returns the output
      as a sequence of lists.
      """; 10, pattern_list; 11, call; 12, block; 13, identifier:_; 14, identifier:grouped; 15, identifier:groupby; 16, argument_list; 17, expression_statement; 18, call; 19, keyword_argument; 20, yield; 21, identifier:sorted; 22, argument_list; 23, identifier:key; 24, identifier:key; 25, call; 26, identifier:iterable; 27, keyword_argument; 28, identifier:list; 29, argument_list; 30, identifier:key; 31, identifier:key; 32, identifier:grouped
code: def group(iterable, key):
      """
      groupby which sorts the input, discards the key and returns the output
      as a sequence of lists.
      """
      for _, grouped in groupby(sorted(iterable, key=key), key=key):
          yield list(grouped)