code: def forward(self, inputs, states):
      def _func(*states):
          i = states[0]
          s = states[1:]
          data = np.squeeze(np.take(inputs, i), axis=0)
          out, new_s = self.cell(data, s)
          new_s = [i + 1] + new_s
          return out, new_s
  
      out, states = npx.while_loop(
          cond=lambda i, *_: i < self.length,
          func=_func,
          loop_vars=states,
          max_iterations=self.length,
      )
      return out
  
imports: from __future__ import print_function
  from six.moves import range
  import argparse
  import subprocess
  from itertools import product
  from time import time
  import mxnet
  import numpy
  from mxnet import gluon, np, npx
label_desc: Use image node_id 2 for calling the WhileRNN obj's underlying member method code with example usage: obj.forward(inputs, states) and returns: out, out,  new_s