class_docstr: Given wrapped example, e.g. A fun movie ! it is <mask> and <mask> .
  The input tokens is:  A fun movie ! it is <s_0> and <s_1> . <eod>
  The decoder tokens is: <s> <s_0> <s_1> <eod>
  The expected output is: <s_0> good <s_1> interesting </s>
  Another solution is add verbalizer label words into the labels, thus generating
  'interesting' given 'good'. However, it is not implemented in this version.
docstr: # TODO doesn't consider the situation that input has two parts
          
docstr_tok: ["#","TODO","does","n't","consider","the","situation","that","input","has","two","parts"]
code: def tokenize_one_example(self, wrapped_example, teacher_forcing):
      """# TODO doesn't consider the situation that input has two parts"""
      wrapped_example, others = wrapped_example
  
      if teacher_forcing:
          tgt_text = others["tgt_text"]
          if isinstance(tgt_text, str):
              tgt_text = [tgt_text]
  
      encoder_inputs = defaultdict(list)
  
      num_mask_token_used = 0
  
      decoder_input_ids = []
      loss_ids = [0]
  
      for piece_id, piece in enumerate(wrapped_example):
          if piece["text"] == self.template_mask_token:
              if teacher_forcing:
                  decoder_input_ids.append(
                      self.mask_token_ids(num_mask_token_used)
                  )
                  encode_text = [
                      self.mask_token_ids(num_mask_token_used)
                  ]
                  tgt_text_ids = self.tokenizer.encode(
                      " " + tgt_text[num_mask_token_used],
                      add_special_tokens=False,
                  )
                  decoder_input_ids.extend(tgt_text_ids)
                  loss_ids.extend([1] * len(tgt_text_ids))
                  # decoder_input_ids.append(self.mask_token_ids(num_mask_token_used+1))
                  loss_ids.append(1)
              else:
                  decoder_input_ids.append(
                      self.mask_token_ids(num_mask_token_used)
                  )
                  encode_text = [
                      self.mask_token_ids(num_mask_token_used)
                  ]
                  # decoder_input_ids.append(self.mask_token_ids(num_mask_token_used+1))
                  loss_ids[-1] = 1  # shift loss_ids
                  loss_ids.append(0)
              num_mask_token_used += 1
          else:
              if piece["text"] in self.special_tokens_maps.keys():
                  to_replace = self.special_tokens_maps[piece["text"]]
                  if to_replace is not None:
                      piece["text"] = to_replace
                  else:
                      raise KeyError(
                          "This tokenizer doesn't specify {} token.".format(
                              piece["text"]
                          )
                      )
  
              if (
                  "soft_token_ids" in piece
                  and piece["soft_token_ids"] != 0
              ):
                  encode_text = [
                      0
                  ]  # can be replace by any token, since these token will use their own embeddings
              else:
                  encode_text = self.tokenizer.encode(
                      piece["text"], add_special_tokens=False
                  )
  
          encoding_length = len(encode_text)
  
          encoder_inputs["input_ids"].append(encode_text)
          for key in piece:
              if key not in ["text", "loss_ids"]:
                  encoder_inputs[key].append(
                      [piece[key]] * encoding_length
                  )
  
      # decoder input ids
      decoder_inputs = {
          "decoder_input_ids": decoder_input_ids,
          "loss_ids": loss_ids,
      }
      decoder_inputs = self.truncate_decoder_inputs(decoder_inputs)
  
      encoder_inputs = self.truncate(encoder_inputs=encoder_inputs)
  
      # delete shortenable ids
      encoder_inputs.pop("shortenable_ids")
      encoder_inputs = self.concate_parts(input_dict=encoder_inputs)
      encoder_inputs = self.add_special_tokens(
          encoder_inputs=encoder_inputs
      )
  
      # create special input ids
      encoder_inputs["attention_mask"] = [1] * len(
          encoder_inputs["input_ids"]
      )
      # padding
      encoder_inputs = self.padding(
          input_dict=encoder_inputs,
          max_len=self.max_seq_length,
          pad_id_for_inputs=self.tokenizer.pad_token_id,
      )
  
      all_input_ids = {**encoder_inputs, **decoder_inputs}
      return all_input_ids
  
imports: from json import decoder
  from transformers.tokenization_utils import PreTrainedTokenizer
  from openprompt.plms.utils import TokenizerWrapper
  from typing import List, Dict, Optional
  from collections import defaultdict
  from openprompt.utils.logging import logger
label_desc: Use image node_id 5 for calling the CPM2TokenizerWrapper obj's underlying member method code with example usage: obj.tokenize_one_example(wrapped_example, teacher_forcing) and returns: all_input_ids