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 = []
  
      [p_i, p_o, p_f] = np.split(self.P, 3)
      H_t = self.H_0
      C_t = self.C_0
      for x in np.split(self.X, self.X.shape[0], axis=0):
          gates = (
              np.dot(x, np.transpose(self.W))
              + np.dot(H_t, np.transpose(self.R))
              + np.add(*np.split(self.B, 2))
          )
          i, o, f, c = np.split(gates, 4, -1)
          i = self.f(i + p_i * C_t)
          f = self.f(f + p_f * C_t)
          c = self.g(c)
          C = f * C_t + i * c
          o = self.f(o + p_o * C)
          H = o * self.h(C)
          h_list.append(H)
          H_t = H
          C_t = C
  
      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/lstm.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 5 for calling the LSTMHelper obj's underlying member method code with example usage: obj.step() and returns: Y,  Y_h