original_docstring: 
      This method should return one epoch worth of batches.
      
docstring: This method should return one epoch worth of batches.
docstring_tokens: This method should return one epoch worth of batches .
code: def __create_batches(
      self,
      instances: Iterable[Instance],
      shuffle: bool
    ) -> Iterable[Batch]:
      """
      This method should return one epoch worth of batches.
      """
      for instance_list in self._memory_sized_lists(instances):
        if shuffle:
          random.shuffle(instance_list)
        
        iterator = iter(instance_list)
        excess: Deque[Instance] = deque()
  
        for batch_instances in lazy_groups_of(iterator, self._batch_size):
          for possibly_smaller_batch in self._ensure_batch_is_sufficiently_small(batch_instances, excess):
            batch = Batch(possibly_smaller_batch)
            yield batch
        if excess:
          yield Batch(excess)
code_tokens: def __create_batches ( self , instances : Iterable [ Instance ] , shuffle : bool ) -> Iterable [ Batch ] : for instance_list in self . _memory_sized_lists ( instances ) : if shuffle : random . shuffle ( instance_list ) iterator = iter ( instance_list ) excess : Deque [ Instance ] = deque ( ) for batch_instances in lazy_groups_of ( iterator , self . _batch_size ) : for possibly_smaller_batch in self . _ensure_batch_is_sufficiently_small ( batch_instances , excess ) : batch = Batch ( possibly_smaller_batch ) yield batch if excess : yield Batch ( excess )
short_docstring: This method should return one epoch worth of batches.
short_docstring_tokens: This method should return one epoch worth of batches .
comment: """
      This method should return one epoch worth of batches.
      """