parameters: (iterable, chunk_size=20)
docstring: chunk an iterable [1,2,3,4,5,6,7,8] -> ([1,2,3], [4,5,6], [7,8])
docstring_summary: chunk an iterable [1,2,3,4,5,6,7,8] -> ([1,2,3], [4,5,6], [7,8])
docstring_tokens: chunk an iterable [ 1 2 3 4 5 6 7 8 ] - > ( [ 1 2 3 ] [ 4 5 6 ] [ 7 8 ] )
function: def chunk(iterable, chunk_size=20):
      """chunk an iterable [1,2,3,4,5,6,7,8] -> ([1,2,3], [4,5,6], [7,8])"""
      items = []
      for value in iterable:
          items.append(value)
          if len(items) == chunk_size:
              yield items
              items = []
      if items:
          yield items
function_tokens: def chunk ( iterable , chunk_size = 20 ) : items = [ ] for value in iterable : items . append ( value ) if len ( items ) == chunk_size : yield items items = [ ] if items : yield items