code: def test_match_encode_decode(self):
      tokenizer_enc = self.tokenizer_en_ru
      tokenizer_dec = self.tokenizer_ru_en
  
      targets = [
          [
              "Here's a little song I wrote. Don't worry, be happy.",
              [
                  2470,
                  39,
                  11,
                  2349,
                  7222,
                  70,
                  5979,
                  7,
                  8450,
                  1050,
                  13160,
                  5,
                  26,
                  6445,
                  7,
                  2,
              ],
          ],
          [
              "This is it. No more. I'm done!",
              [132, 21, 37, 7, 1434, 86, 7, 70, 6476, 1305, 427, 2],
          ],
      ]
  
      # if data needs to be recreated or added, run:
      # import torch
      # model = torch.hub.load("pytorch/fairseq", "transformer.wmt19.en-ru", checkpoint_file="model4.pt", tokenizer="moses", bpe="fastbpe")
      # for src_text, _ in targets: print(f"""[\n"{src_text}",\n {model.encode(src_text).tolist()}\n],""")
  
      for src_text, tgt_input_ids in targets:
          encoded_ids = tokenizer_enc.encode(
              src_text, return_tensors=None
          )
          self.assertListEqual(encoded_ids, tgt_input_ids)
  
          # and decode backward, using the reversed languages model
          decoded_text = tokenizer_dec.decode(
              encoded_ids, skip_special_tokens=True
          )
          self.assertEqual(decoded_text, src_text)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/tests/models/fsmt/test_tokenization_fsmt.py
imports: import json
  import os
  import unittest
  from transformers.models.fsmt.tokenization_fsmt import VOCAB_FILES_NAMES, FSMTTokenizer
  from transformers.testing_utils import slow
  from transformers.utils import cached_property
  from ...test_tokenization_common import TokenizerTesterMixin
label_desc: Use image node_id 7 for calling the FSMTTokenizationTest obj's underlying member method code with example usage: obj.test_match_encode_decode() without return types