class_docstr: @article{DBLP:journals/corr/abs-1906-01265,
  author    = {Chujie Zheng and
              Minlie Huang and
              Aixin Sun},
  title     = {ChID: {A} Large-scale Chinese IDiom Dataset for Cloze Test},
  journal   = {CoRR},
  volume    = {abs/1906.01265},
  year      = {2019},
  url       = {http://arxiv.org/abs/1906.01265},
  eprinttype = {arXiv},
  eprint    = {1906.01265},
  timestamp = {Thu, 14 Oct 2021 09:16:22 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/abs-1906-01265.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
  }
class_docstr_tok: ["@","article","{","DBLP",":","journals\/corr\/abs-1906-01265",",","author","=","{","Chujie","Zheng","and","Minlie","Huang","and","Aixin","Sun","}",",","title","=","{","ChID",":","{","A","}","Large-scale","Chinese","IDiom","Dataset","for","Cloze","Test","}",",","journal","=","{","CoRR","}",",","volume","=","{","abs\/1906.01265","}",",","year","=","{","2019","}",",","url","=","{","http",":","\/\/arxiv.org\/abs\/1906.01265","}",",","eprinttype","=","{","arXiv","}",",","eprint","=","{","1906.01265","}",",","timestamp","=","{","Thu",",","14","Oct","2021","09:16:22","+0200","}",",","biburl","=","{","https",":","\/\/dblp.org\/rec\/journals\/corr\/abs-1906-01265.bib","}",",","bibsource","=","{","dblp","computer","science","bibliography",",","https",":","\/\/dblp.org","}","}"]
code: def get_examples(self, data_dir, split):
      path = os.path.join(data_dir, f"{split}_answer.json")
      answer_map = {}
      with open(path, encoding="utf8") as f:
          answer_map = json.load(f)
      path = os.path.join(data_dir, f"{split}.json")
  
      with open(path, encoding="utf8") as f:
          for line in f:
              example_json = json.loads(line)
              candidates = example_json["candidates"]
              for content in example_json["content"]:
                  modified = []
                  answers = []
                  i = 0
                  while i < len(content):
                      if content[i : i + 6] == "#idiom":
                          modified.append(f"[空白]")
                          j = i + 6
                          while j < len(content):
                              if content[j] == "#":
                                  break
                              j = j + 1
                          j += 1
                          answers.append(
                              candidates[answer_map[content[i:j]]]
                          )
                          i = j
                      else:
                          modified.append(content[i])
                          i = i + 1
  
                  example = InputExample(
                      meta={
                          "text": "".join(modified),
                          "blank": "[空白]",
                          "candidates": ",".join(candidates),
                      },
                      tgt_text=",".join(answers),
                  )
                  examples.append(example)
  
imports: from .processor import *
label_desc: Use image node_id 2 for calling the ChiD obj's underlying member method code with example usage: obj.get_examples(data_dir, split) without return types