code: def nar_model_forward_aux(
      length_prediction_model,
      output_dict,
      dict_feats=None,
  ):
      """
      This function prepares the model configs dictionary for the late fusion models. In particular,
      It checks whether a dictionary embedding is specified. If it does, create a dict_embedding, but do not
      include it as part of the scripttable src_mebedding_list. Beside this, the rest of the code is similar
      to that of a MaskDecopuledSeq2Seq model
      """
      encoder_mask: Optional[torch.Tensor] = None
      if "encoder_mask" in output_dict:
          encoder_mask = output_dict["encoder_mask"]
      (
          output_dict["predicted_tgt_lengths"],
          output_dict["predicted_tgt_lengths_logits"],
      ) = length_prediction_model(
          output_dict["encoder_out"], encoder_mask
      )
      if dict_feats:
          (
              output_dict["dict_tokens"],
              output_dict["dict_weights"],
              output_dict["dict_lengths"],
          ) = dict_feats
  
      return output_dict
  
imports: from typing import Dict, List, Optional, Tuple, Union
  import torch
  from pytext.common.constants import Stage
  from pytext.data.masked_tensorizer import MaskedTokenTensorizer
  from pytext.data.tensorizers import GazetteerTensorizer, Tensorizer, TokenTensorizer
  from pytext.data.utils import Vocabulary
  from pytext.models.embeddings.scriptable_embedding_list import ScriptableEmbeddingList
  from pytext.models.model import Model
  from pytext.models.module import create_module
  from .conv_model import CNNModel, DecoupledCNNModel
  from .mask_generator import MaskedSequenceGenerator
  from .nar_length import ConvLengthPredictionModule, MaskedLengthPredictionModule
  from .nar_output_layer import NARSeq2SeqOutputLayer
  from .seq2seq_model import Seq2SeqModel
label_desc: Use image node_id 1 for calling a global function with example usage: nar_model_forward_aux(length_prediction_model, output_dict, dict_feats) and returns: output_dict