code: def ncycles(iterable, n):
      """Returns the sequence elements *n* times
  
      >>> list(ncycles(["a", "b"], 3))
      ['a', 'b', 'a', 'b', 'a', 'b']
  
      """
      return chain.from_iterable(repeat(tuple(iterable), n))
  
imports: import warnings
  from collections import deque
  from itertools import chain, combinations, count, cycle, groupby, islice, repeat, starmap, tee, zip_longest
  import operator
  from random import randrange, sample, choice
label_desc: Use image node_id 9 for calling a global function with example usage: ncycles(iterable, n) and returns: chain