code: def add_special_tokens(
      model: PreTrainedModel,
      tokenizer: PreTrainedTokenizer,
      specials_to_add: Optional[List[str]] = None,
  ):
      r"""add the special_tokens to tokenizer if the special token
      is not in the tokenizer.
  
      Args:
          model (:obj:`PreTrainedModel`): The pretrained model to resize embedding
                  after adding special tokens.
          tokenizer (:obj:`PreTrainedTokenizer`): The pretrained tokenizer to add special tokens.
          specials_to_add: (:obj:`List[str]`, optional): The special tokens to be added. Defaults to pad token.
  
      Returns:
          The resized model, The tokenizer with the added special tokens.
  
      """
      if specials_to_add is None:
          return model, tokenizer
      for token in specials_to_add:
          if "pad" in token.lower():
              if tokenizer.pad_token is None:
                  tokenizer.add_special_tokens({"pad_token": token})
                  model.resize_token_embeddings(len(tokenizer))
                  logger.info(
                      "pad token is None, set to id {}".format(
                          tokenizer.pad_token_id
                      )
                  )
      return model, tokenizer
  
file_path: OpenPrompt/openprompt/plms/__init__.py
imports: from statistics import mode
  from typing import List, Optional
  from transformers.modeling_utils import PreTrainedModel
  from .utils import TokenizerWrapper
  from transformers.tokenization_utils import PreTrainedTokenizer
  from .mlm import MLMTokenizerWrapper
  from .seq2seq import T5LMTokenizerWrapper, T5TokenizerWrapper
  from .lm import LMTokenizerWrapper
  from transformers import BertConfig, BertTokenizer, BertModel, BertForMaskedLM, RobertaConfig, RobertaTokenizer, RobertaModel, RobertaForMaskedLM, AlbertTokenizer, AlbertConfig, AlbertModel, AlbertForMaskedLM, T5Config, T5Tokenizer, T5ForConditionalGeneration, OpenAIGPTTokenizer, OpenAIGPTLMHeadModel, OpenAIGPTConfig, GPT2Config, GPT2Tokenizer, GPT2LMHeadModel, OPTConfig, OPTForCausalLM, ElectraConfig, ElectraForMaskedLM, ElectraTokenizer, GPTJConfig, GPTJForCausalLM
  from collections import namedtuple
  from yacs.config import CfgNode
  from openprompt.utils.logging import logger
label_desc: Use image node_id 4 for calling a global function with example usage: add_special_tokens(model, tokenizer, specials_to_add) and returns: model,  tokenizer, model,  tokenizer