nodes: 0, module; 1, function_definition; 2, function_name:yield_sorted_by_type; 3, parameters; 4, block; 5, list_splat_pattern; 6, expression_statement; 7, function_definition; 8, return_statement; 9, identifier:typelist; 10, comment:"""
      a useful decorator for the collect_impl method of SuperChange
      subclasses. Caches the yielded changes, and re-emits them
      collected by their type. The order of the types can be specified
      by listing the types as arguments to this decorator. Unlisted
      types will be yielded last in no guaranteed order.
  
      Grouping happens by exact type match only. Inheritance is not
      taken into consideration for grouping.
      """; 11, function_name:decorate; 12, parameters; 13, block; 14, identifier:decorate; 15, identifier:fun; 16, decorated_definition; 17, return_statement; 18, decorator; 19, function_definition; 20, identifier:decorated; 21, call; 22, function_name:decorated; 23, parameters; 24, block; 25, identifier:wraps; 26, argument_list; 27, list_splat_pattern; 28, dictionary_splat_pattern; 29, return_statement; 30, identifier:fun; 31, identifier:args; 32, identifier:kwds; 33, call; 34, identifier:iterate_by_type; 35, argument_list; 36, call; 37, identifier:typelist; 38, identifier:fun; 39, argument_list; 40, list_splat; 41, dictionary_splat; 42, identifier:args; 43, identifier:kwds
code: def yield_sorted_by_type(*typelist):
      """
      a useful decorator for the collect_impl method of SuperChange
      subclasses. Caches the yielded changes, and re-emits them
      collected by their type. The order of the types can be specified
      by listing the types as arguments to this decorator. Unlisted
      types will be yielded last in no guaranteed order.
  
      Grouping happens by exact type match only. Inheritance is not
      taken into consideration for grouping.
      """
  
      def decorate(fun):
          @wraps(fun)
          def decorated(*args, **kwds):
              return iterate_by_type(fun(*args, **kwds), typelist)
          return decorated
  
      return decorate