class_docstr: Base class for QA
class_docstr_tok: ["Base","class","for","QA"]
docstr: batchify contexts
docstr_tok: ["batchify","contexts"]
code: def _batchify(self, contexts, batch_size=8):
      """
      batchify contexts
      """
      if batch_size > len(contexts):
          batch_size = len(contexts)
      num_chunks = math.ceil(len(contexts) / batch_size)
      return list(U.list2chunks(contexts, n=num_chunks))
  
imports: from transformers import AutoModelForQuestionAnswering, AutoTokenizer, TFAutoModelForQuestionAnswering
  from whoosh import index, qparser
  from whoosh.fields import *
  from whoosh.qparser import QueryParser
  from ...None import utils
  from ...imports import *
  from ...torch_base import TorchBase
  from ..None import preprocessor
  from ..None import textutils
  from itertools import chain, zip_longest
label_desc: Use image node_id 8 for calling the ExtractiveQABase obj's underlying member method code with example usage: obj._batchify(contexts, batch_size) and returns: list