code: def test_translation_pipeline(self, pair):
      tokenizer, model, src_text, tgt_text = self.translation_setup(
          pair
      )
      device = 0 if torch_device == "cuda" else -1
      pipeline = TranslationPipeline(
          model, tokenizer, framework="pt", device=device
      )
      output = pipeline([src_text])
      self.assertEqual(
          [tgt_text], [x["translation_text"] for x in output]
      )
  
imports: import tempfile
  import unittest
  import timeout_decorator
  from parameterized import parameterized
  from transformers import FSMTConfig, 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, ids_tensor
label_desc: Use image node_id 8 for calling the FSMTModelIntegrationTests obj's underlying member method code with example usage: obj.test_translation_pipeline(pair) without return types