class_docstr_tok: []
code: def get_examples(self, data_dir, split):
      if split != "train":
          raise ValueError
      path = os.path.join(data_dir, f"{split}.txt")
  
      with open(path, encoding="utf8") as f:
          xs, ys = [], []
          for line in f:
              l = line.split()
              if len(l) == 0:
                  i = 0
                  while i < len(xs):
                      if ys[i][0] == "B":
                          j = i + 1
                          while j < len(xs):
                              if ys[j][0] == "O":
                                  break
                              j = j + 1
  
                          example = InputExample(
                              meta={
                                  "context": "".join(xs),
                                  "entity": "".join(xs[i:j]),
                                  "options": self.labels_mapped,
                              },
                              tgt_text=self.get_label(ys[i][2:]),
                          )
                          examples.append(example)
  
                          i = j
                      else:
                          i = i + 1
  
                  xs, ys = [], []
              else:
                  xs.append(l[0])
                  ys.append(l[1])
  
imports: from .processor import *
label_desc: Use image node_id 2 for calling the DH_MSRA obj's underlying member method code with example usage: obj.get_examples(data_dir, split) without return types