code: def test_sequence_generator_decoder(
      cell_type, num_layers, batch_size
  ):
      hidden_size = 256
      vocab_size = 50
      max_sequence_length = 10
  
      # make repeatable
      set_random_seed(RANDOM_SEED)
  
      combiner_outputs = {HIDDEN: torch.rand([batch_size, hidden_size])}
      sequence_rnn_decoder = SequenceGeneratorDecoder(
          input_size=hidden_size,
          vocab_size=vocab_size,
          max_sequence_length=max_sequence_length,
          cell_type=cell_type,
          num_layers=num_layers,
      )
  
      output = sequence_rnn_decoder(combiner_outputs, target=None)
  
      assert list(output[LOGITS].size()) == [
          batch_size,
          max_sequence_length,
          vocab_size,
      ]
  
      # check for parameter updating
      target = torch.randn(output[LOGITS].shape)
      fpc, tpc, upc, not_updated = check_module_parameters_updated(
          sequence_rnn_decoder, (combiner_outputs, None), target
      )
      assert (
          upc == tpc
      ), f"Failed to update parameters. Parameters not updated: {not_updated}"
  
file_path: ludwig/tests/ludwig/decoders/test_sequence_decoder.py
imports: import pytest
  import torch
  from ludwig.constants import HIDDEN, LOGITS
  from ludwig.decoders.sequence_decoders import LSTMDecoder, RNNDecoder, SequenceGeneratorDecoder, SequenceLSTMDecoder, SequenceRNNDecoder
  from ludwig.utils.misc_utils import set_random_seed
  from tests.integration_tests.parameter_update_utils import check_module_parameters_updated
label_desc: Use image node_id 5 for calling a global function with example usage: test_sequence_generator_decoder(cell_type, num_layers, batch_size) without return types