code: def __post_init__(self):
      doc_tokens = []
      char_to_word_offset = []
      prev_is_whitespace = True
  
      # Split on whitespace so that different tokens may be attributed to their original position.
      for c in self.context_text:
          if is_whitespace(c):
              prev_is_whitespace = True
          else:
              if prev_is_whitespace:
                  doc_tokens.append(c)
              else:
                  doc_tokens[-1] += c
              prev_is_whitespace = False
          char_to_word_offset.append(len(doc_tokens) - 1)
  
      self.doc_tokens = doc_tokens
      self.char_to_word_offset = char_to_word_offset
  
      # Start end end positions only has a value during evaluation.
      if (
          self.start_position_character is not None
          and not self.is_impossible
      ):
          self.start_position = char_to_word_offset[
              self.start_position_character
          ]
          self.end_position = char_to_word_offset[
              min(
                  self.start_position_character
                  + len(self.answer_text)
                  - 1,
                  len(char_to_word_offset) - 1,
              )
          ]
  
imports: import json
  import numpy
  import torch
  from dataclasses import dataclass
  from typing import Union, List, Dict, Optional
  from transformers.models.bert.tokenization_bert import whitespace_tokenize
  from transformers.tokenization_utils_base import TruncationStrategy
  from jiant.tasks.lib.templates.squad_style import utils
  from jiant.shared.constants import PHASE
  from jiant.tasks.core import BaseExample, BaseDataRow, BatchMixin, Task, TaskTypes
  from jiant.utils.python.datastructures import ExtendedDataClassMixin
  from jiant.utils.display import maybe_tqdm
  import logging
label_desc: Use image node_id 1 for calling the Example obj's underlying member method code with example usage: obj.__post_init__() without return types