code: def unique_justseen(iterable, key=None):
      """
      List unique elements, preserving order. Remember only the element just seen.
  
      From https://docs.python.org/3/library/itertools.html#itertools-recipes
      """
      # unique_justseen('AAAABBBCCDAABBB') --> A B C D A B
      # unique_justseen('ABBcCAD', str.lower) --> A B c A D
      return map(
          next,
          map(operator.itemgetter(1), itertools.groupby(iterable, key)),
      )
  
imports: import contextlib
  import itertools
  import math
  import operator
  import platform
  import hashlib
  import inspect
  import sys
  import uuid
  import os
  import asyncio
  import collections
  from pathlib import Path
  from snakemake._version import get_versions
  from snakemake_interface_common.exceptions import WorkflowError
label_desc: Use image node_id 21 for calling a global function with example usage: unique_justseen(iterable, key) and returns: map