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 __init__(
      self,
      max_seq_length: int,
      tokenizer: PreTrainedTokenizer,
      truncate_method: Optional[str] = "tail",
      decoder_max_length: Optional[int] = 128,
      decode_from_pad: Optional[bool] = True,
      predict_eos_token: Optional[bool] = False,
      **kwargs,
  ):
      super().__init__(
          max_seq_length=max_seq_length,
          tokenizer=tokenizer,
          truncate_method=truncate_method,
      )
      self.decoder_max_length = decoder_max_length
      self.decode_from_pad = decode_from_pad
      self.predict_eos = predict_eos_token
      if self.create_token_type_ids:
          logger.warning(
              "token_type_ids is not valid in T5. will be depreciated."
          )
  
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 1 to create a new T5LMTokenizerWrapper object from inherited base classes: TokenizerWrapper with example: obj = T5LMTokenizerWrapper(max_seq_length, tokenizer, truncate_method, decoder_max_length, decode_from_pad, predict_eos_token)