code: def groupby_sorted(iter, key=None):
      """A little helper which first sorts iterable by the same key
  
      Since groupby expects sorted entries
      """
      yield from itertools.groupby(sorted(iter, key=key), key=key)
  
label_desc: Use image node_id 1 for calling a global function with example usage: groupby_sorted(iter, key) without return types