code: def step(self) -> Tuple[np.ndarray, np.ndarray]:
      seq_length = self.X.shape[0]
      hidden_size = self.H_0.shape[-1]
      batch_size = self.X.shape[1]
  
      Y = np.empty(
          [seq_length, self.num_directions, batch_size, hidden_size]
      )
      h_list = []
  
      H_t = self.H_0
      for x in np.split(self.X, self.X.shape[0], axis=0):
          H = self.f(
              np.dot(x, np.transpose(self.W))
              + np.dot(H_t, np.transpose(self.R))
              + np.add(*np.split(self.B, 2))
          )
          h_list.append(H)
          H_t = H
  
      concatenated = np.concatenate(h_list)
      if self.num_directions == 1:
          Y[:, 0, :, :] = concatenated
  
      if self.LAYOUT == 0:
          Y_h = Y[-1]
      else:
          Y = np.transpose(Y, [2, 0, 1, 3])
          Y_h = Y[:, :, -1, :]
  
      return Y, Y_h
  
file_path: onnx/onnx/backend/test/case/node/rnn.py
imports: from typing import Any, Tuple
  import numpy
  import onnx
  from onnx.backend.test.case.base import Base
  from onnx.backend.test.case.node import expect
label_desc: Use image node_id 3 for calling the RNNHelper obj's underlying member method code with example usage: obj.step() and returns: Y,  Y_h