code: def test_sru_backward_simple(
      cuda,
      bidirectional,
      layer_norm,
      normalize_after,
      rescale,
      has_skip_term,
  ):
      torch.manual_seed(123)
      if cuda:
          torch.backends.cudnn.deterministic = True
          torch.backends.cudnn.benchmark = False
  
      input_length = 3
      batch_size = 5
      input_size = 4
      hidden_size = 2
      encoder = sru.SRU(
          input_size,
          hidden_size,
          bidirectional=bidirectional,
          layer_norm=layer_norm,
          normalize_after=normalize_after,
          rescale=rescale,
          has_skip_term=has_skip_term,
      )
      if cuda:
          encoder = encoder.cuda()
  
      def run(x):
          if cuda:
              x = x.cuda()
          output, state = encoder(x)
          output.mean().backward()
  
      # test batch size > 1
      input_data = torch.rand(input_length, batch_size, input_size)
      run(input_data)
  
imports: import pytest
  import sru
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: test_sru_backward_simple(cuda, bidirectional, layer_norm, normalize_after, rescale, has_skip_term) without return types