code: def test_tokenization(self):
      tokenizer = MvpTokenizer.from_pretrained("RUCAIBox/mvp")
      examples = [
          " Hello world",
          " DomDramg",
      ]  # need leading spaces for equality
      fairseq_results = [
          torch.tensor([0, 20920, 232, 2]),
          torch.tensor([0, 11349, 495, 4040, 571, 2]),
      ]
      for ex, desired_result in zip(examples, fairseq_results):
          mvp_toks = tokenizer.encode(ex, return_tensors="pt").squeeze()
          assert_tensors_close(
              desired_result.long(), mvp_toks, prefix=ex
          )
  
imports: import copy
  import tempfile
  import unittest
  import timeout_decorator
  from transformers import MvpConfig, is_torch_available
  from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device
  from transformers.utils import cached_property
  from ...generation.test_generation_utils import GenerationTesterMixin
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
label_desc: Use image node_id 8 for calling the MvpHeadTests obj's underlying member method code with example usage: obj.test_tokenization() without return types