code: def setUpClass(cls):
      cls.batch_size = 2
  
      cls.vocab_size = 20
      cls.embedding_size = 4
  
      cls.hidden_size = 8
      cls.num_steps = 6
  
      cls.data_n_steps = np.random.randint(
          low=cls.num_steps // 2,
          high=cls.num_steps + 1,
          size=cls.batch_size,
      )
      cls.data_x = np.random.random(
          [cls.batch_size, cls.num_steps, cls.embedding_size]
      ).astype(np.float32)
  
      for i in range(cls.batch_size):
          for j in range(cls.data_n_steps[i], cls.num_steps):
              cls.data_x[i][j][:] = 0
  
      cls.data_y = np.zeros([cls.batch_size, 1]).astype(np.float32)
      cls.data_y2 = np.zeros([cls.batch_size, cls.num_steps]).astype(
          np.float32
      )
  
      map1 = np.random.random([1, cls.num_steps])
      map2 = np.random.random([cls.embedding_size, 1])
      for i in range(cls.batch_size):
          cls.data_y[i] = np.matmul(
              map1, np.matmul(cls.data_x[i], map2)
          )
          cls.data_y2[i] = np.matmul(cls.data_x[i], map2)[:, 0]
  
imports: import os
  import unittest
  import numpy
  import tensorflow
  import tensorlayer
  from tests.utils import CustomTestCase
label_desc: Use image node_id 1 for calling the Layer_RNN_Test obj's underlying member method code with example usage: obj.setUpClass(cls) without return types