def call_next(self, inputs, previous_decoder_states):
        """
        Recognize function for prediction network from the previous predicted tokens

        Parameters
        ----------
        inputs : tf.Tensor, shape [B, 1]
        previous_decoder_states : tf.Tensor, shape [B, num_rnns, nstates, rnn_units]

        Returns
        -------
        Tuple[tf.Tensor, tf.Tensor], shapes ([B, 1, rnn_units], [B, num_rnns, nstates, rnn_units])
            Outputs, new states
        """
        with tf.name_scope(f"{self.name}_call_next"):
            previous_decoder_states = tf.transpose(previous_decoder_states, perm=[1, 2, 0, 3])
            outputs = self.label_encoder.call_next(inputs)
            new_states = []
            for i, rnn in enumerate(self.rnns):
                outputs, *_states = rnn(outputs, training=False, initial_state=tf.unstack(previous_decoder_states[i], axis=0))
                new_states.append(tf.stack(_states))
                if self.lns[i] is not None:
                    outputs = self.lns[i](outputs, training=False)
                if self.projections[i] is not None:
                    outputs = self.projections[i](outputs, training=False)
            return outputs, tf.transpose(tf.stack(new_states, axis=0), perm=[2, 0, 1, 3])

        Recognize function for prediction network from the previous predicted tokens

        Parameters
        ----------
        inputs : tf.Tensor, shape [B, 1]
        previous_decoder_states : tf.Tensor, shape [B, num_rnns, nstates, rnn_units]

        Returns
        -------
        Tuple[tf.Tensor, tf.Tensor], shapes ([B, 1, rnn_units], [B, num_rnns, nstates, rnn_units])
            Outputs, new states
        
tensorflow_asr/models/transducer/base_transducer.py