code: def partition(pred, iterable):
      # adapted from python's examples
      t1, t2 = tee(iterable)
      return list(filter(pred, t1)), list(filterfalse(pred, t2))
  
imports: from itertools import filterfalse, groupby, tee
  import json
  import subprocess
  from tempfile import NamedTemporaryFile
  from .core import Benchmark
  from ..utils.command import Command
label_desc: Use image node_id 1 for calling a global function with example usage: partition(pred, iterable) and returns: list,  list