class_docstr: Loads a HuggingFace ``transformers`` model and tokenizer.
code: def __init__(self, model, tokenizer):
      assert isinstance(
          model, (transformers.PreTrainedModel, T5ForTextToText)
      ), f"`model` must be of type `transformers.PreTrainedModel`, but got type {type(model)}."
      assert isinstance(
          tokenizer,
          (
              transformers.PreTrainedTokenizer,
              transformers.PreTrainedTokenizerFast,
              T5Tokenizer,
          ),
      ), f"`tokenizer` must of type `transformers.PreTrainedTokenizer` or `transformers.PreTrainedTokenizerFast`, but got type {type(tokenizer)}."
  
      self.model = model
      self.tokenizer = tokenizer
  
file_path: TextAttack/textattack/models/wrappers/huggingface_model_wrapper.py
imports: import torch
  import transformers
  import textattack
  from textattack.models.helpers import T5ForTextToText
  from textattack.models.tokenizers import T5Tokenizer
  from .pytorch_model_wrapper import PyTorchModelWrapper
label_desc: Use image node_id 1 to create a new HuggingFaceModelWrapper object from inherited base classes: PyTorchModelWrapper with example: obj = HuggingFaceModelWrapper(model, tokenizer)