code: def multi_lstm_reference(
      input,
      hidden_input_list,
      cell_input_list,
      i2h_w_list,
      i2h_b_list,
      gates_w_list,
      gates_b_list,
      seq_lengths,
      forget_bias,
      drop_states=False,
  ):
      num_layers = len(hidden_input_list)
      assert len(cell_input_list) == num_layers
      assert len(i2h_w_list) == num_layers
      assert len(i2h_b_list) == num_layers
      assert len(gates_w_list) == num_layers
      assert len(gates_b_list) == num_layers
  
      for i in range(num_layers):
          layer_input = np.dot(input, i2h_w_list[i].T) + i2h_b_list[i]
          h_all, h_last, c_all, c_last = lstm_reference(
              layer_input,
              hidden_input_list[i],
              cell_input_list[i],
              gates_w_list[i],
              gates_b_list[i],
              seq_lengths,
              forget_bias,
              drop_states=drop_states,
          )
          input = h_all
      return h_all, h_last, c_all, c_last
  
imports: from caffe2.python import core, gradient_checker, rnn_cell, workspace, scope, utils
  from caffe2.python.attention import AttentionType
  from caffe2.python.model_helper import ModelHelper, ExtractPredictorNet
  from caffe2.python.rnn.rnn_cell_test_util import sigmoid, tanh, _prepare_rnn
  from caffe2.proto import caffe2_pb2
  import caffe2.python.hypothesis_test_util
  from functools import partial
  from hypothesis import assume, given
  from hypothesis import settings
  import hypothesis.strategies
  import numpy
  import unittest
label_desc: Use image node_id 5 for calling a global function with example usage: multi_lstm_reference(input, hidden_input_list, cell_input_list, i2h_w_list, i2h_b_list, gates_w_list, gates_b_list, seq_lengths, forget_bias, drop_states) and returns: h_all,  h_last,  c_all,  c_last