class_docstr: The Squad Feature
  
  Parameters
  ----------
  qas_id
      The unique query/answer ID in the squad dataset
  query_token_ids
      The tokenized query.
  context_text
      The original text of the context
  context_token_ids
      The tokenized context.
  context_token_offsets
      The offsets of the tokens in the original context string
  is_impossible
      Whether the sample is impossible.
  token_answer_mismatch
      If this value is True, it means that we cannot reconstruct the ground-truth answer with
      the tokenized version. Usually, the span-prediction-based approach won't be very
      accurate and we should rely on the encoder-decoder approach.
      For example:
          GT: "japan", Tokenized Version: "japanese"
               "six'                       "sixth"
               "one"                       "iPhone"
               "breed"                     "breeding"
               "emotion"                   "emotional"
  
  unreliable_span
      If this value is True, it means that we cannot rely on the gt_start_pos and gt_end_pos.
      In this scenario, we cannot utilize the span-prediction-based approach.
      One example is the question about "how many", the answer will spread across the
      whole document and there is no clear span.
  gt_answer_text
      The ground-truth answer text
  gt_start_pos
      The start position of the ground-truth span. None indicates that there is no valid
      ground-truth span.
  gt_end_pos
      The end position of the ground-truth span. None indicates that there is no valid
      ground-truth span.
class_docstr_tok: ["The","Squad","Feature","Parameters","--","--","--","--","--","qas_id","The","unique","query\/answer","ID","in","the","squad","dataset","query_token_ids","The","tokenized","query",".","context_text","The","original","text","of","the","context","context_token_ids","The","tokenized","context",".","context_token_offsets","The","offsets","of","the","tokens","in","the","original","context","string","is_impossible","Whether","the","sample","is","impossible",".","token_answer_mismatch","If","this","value","is","True",",","it","means","that","we","can","not","reconstruct","the","ground-truth","answer","with","the","tokenized","version",".","Usually",",","the","span-prediction-based","approach","wo","n't","be","very","accurate","and","we","should","rely","on","the","encoder-decoder","approach",".","For","example",":","GT",":","``","japan","''",",","Tokenized","Version",":","``","japanese","''","``","six","'","``","sixth","''","``","one","''","``","iPhone","''","``","breed","''","``","breeding","''","``","emotion","''","``","emotional","''","unreliable_span","If","this","value","is","True",",","it","means","that","we","can","not","rely","on","the","gt_start_pos","and","gt_end_pos",".","In","this","scenario",",","we","can","not","utilize","the","span-prediction-based","approach",".","One","example","is","the","question","about","``","how","many","''",",","the","answer","will","spread","across","the","whole","document","and","there","is","no","clear","span",".","gt_answer_text","The","ground-truth","answer","text","gt_start_pos","The","start","position","of","the","ground-truth","span",".","None","indicates","that","there","is","no","valid","ground-truth","span",".","gt_end_pos","The","end","position","of","the","ground-truth","span",".","None","indicates","that","there","is","no","valid","ground-truth","span","."]
code: def to_json(self):
      return json.dumps(dataclasses.asdict(self), ensure_ascii=False)
  
imports: from typing import Optional, List, Tuple
  from collections import namedtuple
  import dataclasses
  from dataclasses import dataclass
  import re
  import numpy
  import warnings
  import os
  from tqdm.auto import tqdm
  import json
  import string
  from gluonnlp.data.tokenizers import BaseTokenizerWithVocab
  from gluonnlp.utils.preprocessing import match_tokens_with_char_spans
  from mxnet.gluon.utils import download
  import mxnet
label_desc: Use image node_id 1 for calling the SquadFeature obj's underlying member method code with example usage: obj.to_json() and returns: json