code: def test_rnn():
      # test rnn patch can produce the meta output with correct shape
      data = (torch.randn(5, 3, 10), torch.randn(2, 3, 20))
      module = torch.nn.RNN(10, 20, 2)
      output, hn = module(*data)
      meta_data = (
          torch.randn(5, 3, 10).to("meta"),
          torch.randn(2, 3, 20).to("meta"),
      )
      _assert_output_shape(
          meta_data,
          module,
          patched_module.torch_nn_rnn,
          False,
          (output.shape, hn.shape),
      )
  
      # test if the rnn patch can catch exception when dimension does not match
      data = (torch.randn(5, 3, 10), torch.randn(2, 3, 20))
      module = torch.nn.RNN(10, 20, 2)
      output, hn = module(*data)
      meta_data = (
          torch.randn(5, 3, 1).to("meta"),
          torch.randn(2, 3, 20).to("meta"),
      )
      _assert_output_shape(
          meta_data, module, patched_module.torch_nn_rnn, True, None
      )
  
file_path: colossalai/tests/test_fx/test_tracer/test_patched_module.py
imports: import torch
  from colossalai.fx.tracer.meta_patch import patched_module
  from colossalai.testing import clear_cache_before_run
label_desc: Use image node_id 4 for calling a global function with example usage: test_rnn() without return types