class_docstr: The tokenizerwrapper is for the t5-lm-adapted version proposed by
  `The Power of Scale for Parameter-Efficient Prompt Tuning <https://arxiv.org/abs/2104.08691>`_
  Since this model is a autogressive language model fashion, it only support generation from the
  and of the text.
  
  Given wrapped example, e.g. A fun movie ! it is {"mask"}
  The encoder input is :  A fun movie ! it is </s>
  (Note that </s> is added in T5 encoder inputs, this will yield better result compared to not using </s>)
  The decoder input is : <pad> <extra_id_0> </s>
  The expected output is : good
  Under teacher forcing mode, the decoder input is   <pad> <extra_id_0>  good </s>, where good and </s> requires loss
code: def truncate_decoder_inputs(self, inputs):
      if self.decode_from_pad:
          inputs["decoder_input_ids"].insert(
              0, self.tokenizer.pad_token_id
          )
          inputs["loss_ids"].insert(0, 0)
  
      for key in inputs:
          inputs[key] = inputs[key][: self.decoder_max_length - 1]
  
      inputs["decoder_input_ids"].append(self.tokenizer.eos_token_id)
      if self.predict_eos:
          inputs["loss_ids"].append(1)
      else:
          inputs["loss_ids"].append(0)
      inputs = self.padding(inputs, max_len=self.decoder_max_length)
      return inputs
  
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 6 for calling the T5LMTokenizerWrapper obj's underlying member method code with example usage: obj.truncate_decoder_inputs(inputs) and returns: inputs