code: def _test_forward_with_tuple_output(self, gpu):
      in_size = 5
      out_size = 6
  
      def split_output(x):
          return tuple(torch.split(x, [2, 1, 3], dim=1))
  
      rseq = RecurrentSequential(
          nn.RNN(
              num_layers=1, input_size=in_size, hidden_size=out_size
          ),
          Lambda(split_output),
      )
  
      if gpu >= 0:
          device = torch.device("cuda:{}".format(gpu))
          rseq.to(device)
      else:
          device = torch.device("cpu")
  
      # Input is a list of two variables.
      seqs_x = [
          torch.rand(3, in_size, device=device),
          torch.rand(2, in_size, device=device),
      ]
  
      packed_x = nn.utils.rnn.pack_sequence(
          seqs_x, enforce_sorted=False
      )
  
      # Concatenated output should be a tuple of three variables.
      out, _ = rseq(packed_x, None)
  
      self.assertIsInstance(out, tuple)
      self.assertEqual(len(out), 3)
      self.assertEqual(out[0].data.shape, (5, 2))
      self.assertEqual(out[1].data.shape, (5, 1))
      self.assertEqual(out[2].data.shape, (5, 3))
  
file_path: pfrl/tests/nn_tests/test_recurrent_sequential.py
imports: import unittest
  import pytest
  import torch
  import torch.nn.functional
  from torch import nn
  from pfrl.nn import Lambda, RecurrentSequential
  from pfrl.testing import torch_assert_allclose
label_desc: Use image node_id 7 for calling the TestRecurrentSequential obj's underlying member method code with example usage: obj._test_forward_with_tuple_output(gpu) and returns: tuple