code: def partition(pred, iterable):
      """
      Returns a 2-tuple of iterables derived from the input iterable.
      The first yields the items that have ``pred(item) == False``.
      The second yields the items that have ``pred(item) == True``.
  
          >>> is_odd = lambda x: x % 2 != 0
          >>> iterable = range(10)
          >>> even_items, odd_items = partition(is_odd, iterable)
          >>> list(even_items), list(odd_items)
          ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9])
  
      """
      # partition(is_odd, range(10)) --> 0 2 4 6 8   and  1 3 5 7 9
      t1, t2 = tee(iterable)
      return filterfalse(pred, t1), filter(pred, t2)
  
imports: from collections import deque
  from itertools import chain, combinations, count, cycle, groupby, islice, repeat, starmap, tee
  import operator
  from random import randrange, sample, choice
  from six import PY2
  from six.moves import filter, filterfalse, map, range, zip, zip_longest
label_desc: Use image node_id 17 for calling a global function with example usage: partition(pred, iterable) and returns: filterfalse,  filter