code: def roundrobin(*iterables):
      """Yields an item from each iterable, alternating between them.
  
          >>> list(roundrobin('ABC', 'D', 'EF'))
          ['A', 'D', 'E', 'B', 'F', 'C']
  
      This function produces the same output as :func:`interleave_longest`, but
      may perform better for some inputs (in particular when the number of
      iterables is small).
  
      """
      # Recipe credited to George Sakkis
      pending = len(iterables)
      if PY2:
          nexts = cycle(iter(it).next for it in iterables)
      else:
          nexts = cycle(iter(it).__next__ for it in iterables)
      while pending:
          try:
              for next in nexts:
                  yield next()
          except StopIteration:
              pending -= 1
              nexts = cycle(islice(nexts, pending))
  
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 16 for calling a global function with example usage: roundrobin() without return types