code: def test_RNNDecoder_backward(context_residual, rnn_type):
      decoder = RNNDecoder(
          10, 12, context_residual=context_residual, rnn_type=rnn_type
      )
      x = torch.randn(2, 9, 12)
      x_lens = torch.tensor([9, 7], dtype=torch.long)
      t = torch.randint(0, 10, [2, 4], dtype=torch.long)
      t_lens = torch.tensor([4, 3], dtype=torch.long)
      z_all, ys_in_lens = decoder(x, x_lens, t, t_lens)
      z_all.sum().backward()
  
imports: import pytest
  import torch
  from espnet2.asr.decoder.rnn_decoder import RNNDecoder
  from espnet.nets.beam_search import BeamSearch
label_desc: Use image node_id 1 for calling a global function with example usage: test_RNNDecoder_backward(context_residual, rnn_type) without return types