code: def test_post_process_forward(self):
      config: TransformerConfig = self.t5_model.config
      sequence_length = self.t5_model.max_sequence_length
      micro_batch_size = 2
  
      self.t5_model.cuda()
  
      data = list(range(sequence_length))
      encoder_input_ids = (
          torch.tensor(data, dtype=torch.int64)
          .repeat((micro_batch_size, 1))
          .cuda()
      )
      decoder_input_ids = (
          torch.tensor(data, dtype=torch.int64)
          .repeat((micro_batch_size, 1))
          .cuda()
      )
      encoder_attn_mask = torch.ones(
          (1, sequence_length, sequence_length), dtype=bool
      ).cuda()
      decoder_attn_mask = torch.ones(
          (1, sequence_length, sequence_length), dtype=bool
      ).cuda()
      encoder_decoder_attn_mask = torch.ones(
          (1, sequence_length, sequence_length), dtype=bool
      ).cuda()
  
      logits = self.t5_model.forward(
          encoder_input_ids=encoder_input_ids,
          decoder_input_ids=decoder_input_ids,
          encoder_attn_mask=encoder_attn_mask,
          decoder_attn_mask=decoder_attn_mask,
          encoder_decoder_attn_mask=encoder_decoder_attn_mask,
      )
  
      assert logits.shape[0] == micro_batch_size
      assert logits.shape[1] == sequence_length
      assert logits.shape[2] == self.t5_model.vocab_size
  
file_path: megatron-lm/tests/unit_tests/models/test_t5_model.py
imports: import pytest
  import torch
  from megatron.core.transformer.transformer_config import TransformerConfig
  from megatron.core.models.T5.t5_model import T5Model
  from tests.unit_tests.test_utilities import Utils
  from megatron.core.tensor_parallel.random import model_parallel_cuda_manual_seed
  from megatron.core.models.T5.t5_spec import get_t5_encoder_with_transformer_engine_block_spec, get_t5_decoder_with_transformer_engine_block_spec, get_t5_encoder_with_local_block_spec, get_t5_decoder_with_local_block_spec
label_desc: Use image node_id 5 for calling the TestT5Model obj's underlying member method code with example usage: obj.test_post_process_forward() without return types