code: def test_decoder_forward_backward(whisper_decoder):
      hs_pad = torch.randn(
          4, 100, 384, device=next(whisper_decoder.parameters()).device
      )
      ys_in_pad = torch.randint(
          0,
          3000,
          (4, 10),
          device=next(whisper_decoder.parameters()).device,
      )
      out, _ = whisper_decoder(hs_pad, None, ys_in_pad, None)
  
      assert out.size() == torch.Size(
          [4, 10, VOCAB_SIZE_WHISPER_MULTILINGUAL]
      )
      out.sum().backward()
  
file_path: espnet/test/espnet2/asr/decoder/test_whisper_decoder.py
imports: import sys
  import pytest
  import torch
  from packaging.version import parse
  from espnet2.asr.decoder.whisper_decoder import OpenAIWhisperDecoder
label_desc: Use image node_id 6 for calling a global function with example usage: test_decoder_forward_backward(whisper_decoder) without return types