code: def test_batch_fairseq_parity(self):
      batch = self.tokenizer(
          self.src_text,
          text_target=self.tgt_text,
          padding=True,
          return_tensors="pt",
      )
      batch["decoder_input_ids"] = shift_tokens_right(
          batch["labels"], self.tokenizer.pad_token_id
      )
  
      # fairseq batch: https://gist.github.com/sshleifer/cba08bc2109361a74ac3760a7e30e4f4
      assert batch.input_ids[1][-2:].tolist() == [2, EN_CODE]
      assert batch.decoder_input_ids[1][0].tolist() == RO_CODE
      assert batch.decoder_input_ids[1][-1] == 2
      assert batch.labels[1][-2:].tolist() == [2, RO_CODE]
  
imports: import shutil
  import tempfile
  import unittest
  from transformers import SPIECE_UNDERLINE, BatchEncoding, MBartTokenizer, MBartTokenizerFast, is_torch_available
  from transformers.testing_utils import get_tests_dir, nested_simplify, require_sentencepiece, require_tokenizers, require_torch
  from ...test_tokenization_common import TokenizerTesterMixin
label_desc: Use image node_id 8 for calling the MBartEnroIntegrationTest obj's underlying member method code with example usage: obj.test_batch_fairseq_parity() without return types