class_docstr: Processor for the SQuAD data set. overridden by SquadV1Processor and SquadV2Processor, used by the version 1.1 and
  version 2.0 of SQuAD, respectively.
class_docstr_tok: ["Processor","for","the","SQuAD","data","set",".","overridden","by","SquadV1Processor","and","SquadV2Processor",",","used","by","the","version","1.1","and","version","2.0","of","SQuAD",",","respectively","."]
code: def _create_examples(self, input_data, set_type):
      is_training = set_type == "train"
      examples = []
      for entry in tqdm(input_data):
          title = entry["title"]
          for paragraph in entry["paragraphs"]:
              context_text = paragraph["context"]
              for qa in paragraph["qas"]:
                  qas_id = qa["id"]
                  question_text = qa["question"]
                  start_position_character = None
                  answer_text = None
                  answers = []
  
                  is_impossible = qa.get("is_impossible", False)
                  if not is_impossible:
                      if is_training:
                          answer = qa["answers"][0]
                          answer_text = answer["text"]
                          start_position_character = answer[
                              "answer_start"
                          ]
                      else:
                          answers = qa["answers"]
  
                  example = SquadExample(
                      qas_id=qas_id,
                      question_text=question_text,
                      context_text=context_text,
                      answer_text=answer_text,
                      start_position_character=start_position_character,
                      title=title,
                      is_impossible=is_impossible,
                      answers=answers,
                  )
                  examples.append(example)
      return examples
  
imports: import json
  import os
  from functools import partial
  from multiprocessing import Pool, cpu_count
  import numpy
  from tqdm import tqdm
  from ...models.bert.tokenization_bert import whitespace_tokenize
  from ...tokenization_utils_base import BatchEncoding, PreTrainedTokenizerBase, TruncationStrategy
  from ...utils import is_tf_available, is_torch_available, logging
  from .utils import DataProcessor
label_desc: Use image node_id 5 for calling the SquadProcessor obj's underlying member method code with example usage: obj._create_examples(input_data, set_type) and returns: examples