code: def test_mbart_fast_forward(self):
      config = MBartConfig(
          vocab_size=99,
          d_model=24,
          encoder_layers=2,
          decoder_layers=2,
          encoder_attention_heads=2,
          decoder_attention_heads=2,
          encoder_ffn_dim=32,
          decoder_ffn_dim=32,
          max_position_embeddings=48,
          add_final_layer_norm=True,
      )
      lm_model = MBartForConditionalGeneration(config).to(torch_device)
      context = torch.tensor(
          [[71, 82, 18, 33, 46, 91, 2], [68, 34, 26, 58, 30, 2, 1]],
          device=torch_device,
          dtype=torch.long,
      )
      summary = torch.tensor(
          [[82, 71, 82, 18, 2], [58, 68, 2, 1, 1]],
          device=torch_device,
          dtype=torch.long,
      )
      result = lm_model(
          input_ids=context, decoder_input_ids=summary, labels=summary
      )
      expected_shape = (*summary.shape, config.vocab_size)
      self.assertEqual(result.logits.shape, expected_shape)
  
imports: import copy
  import tempfile
  import unittest
  from transformers import MBartConfig, is_torch_available
  from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, require_torch_fp16, slow, torch_device
  from transformers.utils import cached_property
  from ...generation.test_utils import GenerationTesterMixin
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, ids_tensor
  from ...test_pipeline_mixin import PipelineTesterMixin
label_desc: Use image node_id 4 for calling the MBartEnroIntegrationTest obj's underlying member method code with example usage: obj.test_mbart_fast_forward() without return types