class_docstr: This is the implementation which support T5 and other Encoder-Decoder model,
  as soon as their blocks allows the ``past_key_values`` to be injected to the model.
  This implementation modifies the huggingface's T5 forward without touching the code-base.
  However, it may fail to work when used in DataParallel model. Please use it using
  single gpu or model-parallel training.
  
  Args:
      model (:obj:`PreTrainedModel`): The pre-trained model.
      plm_config (:obj:`PretrainedConfig`): The configuration of the current pre-trained model.
      tokenizer (:obj:`PreTrainedTokenizer`): The tokenizer of the current pre-trained model.
      mapping_hook (:obj:`nn.Module`, optional):
      text (:obj:`str`, optional):
      num_token (:obj:`int`, optional):
      placeholder_mapping (:obj:`dict`):
      prefix_dropout (:obj:`float`, optional): The dropout rate for the prefix sequence.
class_docstr_tok: ["This","is","the","implementation","which","support","T5","and","other","Encoder-Decoder","model",",","as","soon","as","their","blocks","allows","the","``","past_key_values","``","to","be","injected","to","the","model",".","This","implementation","modifies","the","huggingface","'s","T5","forward","without","touching","the","code-base",".","However",",","it","may","fail","to","work","when","used","in","DataParallel","model",".","Please","use","it","using","single","gpu","or","model-parallel","training",".","Args",":","model","(",":","obj",":","`","PreTrainedModel","`",")",":","The","pre-trained","model",".","plm_config","(",":","obj",":","`","PretrainedConfig","`",")",":","The","configuration","of","the","current","pre-trained","model",".","tokenizer","(",":","obj",":","`","PreTrainedTokenizer","`",")",":","The","tokenizer","of","the","current","pre-trained","model",".","mapping_hook","(",":","obj",":","`","nn.Module","`",",","optional",")",":","text","(",":","obj",":","`","str","`",",","optional",")",":","num_token","(",":","obj",":","`","int","`",",","optional",")",":","placeholder_mapping","(",":","obj",":","`","dict","`",")",":","prefix_dropout","(",":","obj",":","`","float","`",",","optional",")",":","The","dropout","rate","for","the","prefix","sequence","."]
code: def wrap_one_example(self, example) -> List[Dict]:
      if self.text is None:
          if example.text_b is None:
              self.text = self.default_text1
          else:
              self.text = self.default_text2
      return super().wrap_one_example(example)
  
imports: from functools import partial
  from transformers.configuration_utils import PretrainedConfig
  from transformers.models.gpt2.configuration_gpt2 import GPT2Config
  from transformers.models.t5.configuration_t5 import T5Config
  from transformers.models.t5.modeling_t5 import T5ForConditionalGeneration
  from transformers.models.gpt2.modeling_gpt2 import GPT2LMHeadModel
  from openprompt.data_utils import InputFeatures
  import os
  import torch
  from torch import nn
  from typing import *
  from transformers import PreTrainedModel
  from transformers.tokenization_utils import PreTrainedTokenizer
  from openprompt import Template
  from openprompt.utils.logging import logger
label_desc: Use image node_id 5 for calling the PrefixTuningTemplate obj's underlying member method code with example usage: obj.wrap_one_example(example) and returns: super