parameters: (iterable, fillvalue=None, n=None, next_multiple=False)
docstring: Yield the elements from *iterable*, followed by *fillvalue*, such that
      at least *n* items are emitted.
  
          >>> list(padded([1, 2, 3], '?', 5))
          [1, 2, 3, '?', '?']
  
      If *next_multiple* is ``True``, *fillvalue* will be emitted until the
      number of items emitted is a multiple of *n*::
  
          >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True))
          [1, 2, 3, 4, None, None]
  
      If *n* is ``None``, *fillvalue* will be emitted indefinitely.
docstring_summary: Yield the elements from *iterable*, followed by *fillvalue*, such that
      at least *n* items are emitted.
docstring_tokens: Yield the elements from * iterable * followed by * fillvalue * such that at least * n * items are emitted .
function: def padded(iterable, fillvalue=None, n=None, next_multiple=False):
      """Yield the elements from *iterable*, followed by *fillvalue*, such that
      at least *n* items are emitted.
  
          >>> list(padded([1, 2, 3], '?', 5))
          [1, 2, 3, '?', '?']
  
      If *next_multiple* is ``True``, *fillvalue* will be emitted until the
      number of items emitted is a multiple of *n*::
  
          >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True))
          [1, 2, 3, 4, None, None]
  
      If *n* is ``None``, *fillvalue* will be emitted indefinitely.
  
      """
      it = iter(iterable)
      if n is None:
          for item in chain(it, repeat(fillvalue)):
              yield item
      elif n < 1:
          raise ValueError('n must be at least 1')
      else:
          item_count = 0
          for item in it:
              yield item
              item_count += 1
  
          remaining = (n - item_count) % n if next_multiple else n - item_count
          for _ in range(remaining):
              yield fillvalue
function_tokens: def padded ( iterable , fillvalue = None , n = None , next_multiple = False ) : it = iter ( iterable ) if n is None : for item in chain ( it , repeat ( fillvalue ) ) : yield item elif n < 1 : raise ValueError ( 'n must be at least 1' ) else : item_count = 0 for item in it : yield item item_count += 1 remaining = ( n - item_count ) % n if next_multiple else n - item_count for _ in range ( remaining ) : yield fillvalue