code: def _create_examples(cls, lines, set_type):
      examples = []
      for line in lines:
          passage_text = line["passage"]["text"]
          for qas in line["qas"]:
              answers_dict = {}
              if set_type != "test":
                  answers_dict = {
                      (answer["start"], answer["end"]): answer["text"]
                      for answer in qas["answers"]
                  }
              for entity in line["passage"]["entities"]:
                  label = False
                  entity_span = (entity["start"], entity["end"])
                  if set_type != "test":
                      if entity_span in answers_dict:
                          assert (
                              passage_text[
                                  entity_span[0] : entity_span[1] + 1
                              ]
                              == answers_dict[entity_span]
                          )
                          label = True
  
                  examples.append(
                      Example(
                          # NOTE: ReCoRDTask.super_glue_format_preds() is
                          # dependent on this guid format.
                          guid="%s-%s-%s"
                          % (set_type, len(examples), qas["idx"]),
                          passage_text=passage_text,
                          query_text=qas["query"],
                          entity_start_char_idx=entity_span[0],
                          entity_end_char_idx=entity_span[1]
                          + 1,  # make exclusive
                          entity_str=passage_text[
                              entity_span[0] : entity_span[1] + 1
                          ],
                          passage_idx=line["idx"],
                          question_idx=qas["idx"],
                          answers_dict=answers_dict,
                          label=label,
                      )
                  )
      return examples
  
imports: import numpy
  import torch
  from dataclasses import dataclass
  from typing import List
  from jiant.tasks.core import BaseExample, BaseTokenizedExample, BaseDataRow, BatchMixin, SuperGlueMixin, Task, TaskTypes
  from jiant.tasks.lib.templates.shared import labels_to_bimap, double_sentence_featurize
  from jiant.utils.python.io import read_json_lines
label_desc: Use image node_id 4 for calling the ReCoRDTask obj's underlying member method code with example usage: obj._create_examples(cls, lines, set_type) and returns: examples