code: def run_decoder(self,
                      prev_word: mx.nd.NDArray,
                      bucket_key: Tuple[int, int],
                      model_state: 'ModelState') -> Tuple[mx.nd.NDArray, mx.nd.NDArray, 'ModelState']:
          
          batch_beam_size = prev_word.shape[0]
          batch = mx.io.DataBatch(
              data=[prev_word.as_in_context(self.context)] + model_state.states,
              label=None,
              bucket_key=bucket_key,
              provide_data=self._get_decoder_data_shapes(bucket_key, batch_beam_size))
          self.decoder_module.forward(data_batch=batch, is_train=False)
          out, attention_probs, *model_state.states = self.decoder_module.get_outputs()
          return out, attention_probs, model_state
docs: Runs forward pass of the single-step decoder.
  
          :param prev_word: Previous word ids. Shape: (batch*beam,).
          :param bucket_key: Bucket key.
          :param model_state: Model states.
          :return: Decoder stack output (logit inputs or probability distribution), attention scores, updated model state.