code: def test_decoder():
      input_dummy = torch.rand(8, 128, 37).to(device)
      input_lengths = torch.randint(31, 37, (8,)).long().to(device)
      input_lengths[-1] = 37
  
      input_mask = torch.unsqueeze(
          sequence_mask(input_lengths, input_dummy.size(2)), 1
      ).to(device)
      # residual bn conv decoder
      layer = Decoder(out_channels=11, in_hidden_channels=128).to(
          device
      )
      output = layer(input_dummy, input_mask)
      assert list(output.shape) == [8, 11, 37]
      # transformer decoder
      layer = Decoder(
          out_channels=11,
          in_hidden_channels=128,
          decoder_type="relative_position_transformer",
          decoder_params={
              "hidden_channels_ffn": 128,
              "num_heads": 2,
              "kernel_size": 3,
              "dropout_p": 0.1,
              "num_layers": 8,
              "rel_attn_window_size": 4,
              "input_length": None,
          },
      ).to(device)
      output = layer(input_dummy, input_mask)
      assert list(output.shape) == [8, 11, 37]
      # wavenet decoder
      layer = Decoder(
          out_channels=11,
          in_hidden_channels=128,
          decoder_type="wavenet",
          decoder_params={
              "num_blocks": 12,
              "hidden_channels": 192,
              "kernel_size": 5,
              "dilation_rate": 1,
              "num_layers": 4,
              "dropout_p": 0.05,
          },
      ).to(device)
      output = layer(input_dummy, input_mask)
      # FFTransformer decoder
      layer = Decoder(
          out_channels=11,
          in_hidden_channels=128,
          decoder_type="fftransformer",
          decoder_params={
              "hidden_channels_ffn": 31,
              "num_heads": 2,
              "dropout_p": 0.1,
              "num_layers": 2,
          },
      ).to(device)
      output = layer(input_dummy, input_mask)
      assert list(output.shape) == [8, 11, 37]
  
imports: import torch
  from TTS.tts.layers.feed_forward.decoder import Decoder
  from TTS.tts.layers.feed_forward.encoder import Encoder
  from TTS.tts.utils.helpers import sequence_mask
label_desc: Use image node_id 2 for calling a global function with example usage: test_decoder() without return types