code: def prepare_generator_inputs(
      self,
      word_ids: List[int],
      dict_feat: Optional[
          Tuple[List[str], List[float], List[int]]
      ] = None,
      contextual_token_embedding: Optional[List[float]] = None,
  ) -> Tuple[
      torch.Tensor,
      Optional[Tuple[torch.Tensor, torch.Tensor, torch.Tensor]],
      Optional[torch.Tensor],
      torch.Tensor,
  ]:
      src_len = len(word_ids)
      dict_tensors: Optional[
          Tuple[torch.Tensor, torch.Tensor, torch.Tensor]
      ] = None
      if dict_feat is not None:
          dict_tokens, dict_weights, dict_lengths = dict_feat
          dict_ids = self.dictfeat_vocab.lookup_indices_1d(dict_tokens)
          dict_tensors = (
              torch.tensor([dict_ids]),
              torch.tensor([dict_weights], dtype=torch.float),
              torch.tensor([dict_lengths]),
          )
  
      contextual_embedding_tensor: Optional[torch.Tensor] = None
      if contextual_token_embedding is not None:
          assert (
              len(contextual_token_embedding) % src_len == 0
              and len(contextual_token_embedding) > 0
          ), (
              f"Incorrect size for contextual embeddings: "
              f"{len(contextual_token_embedding)}, Expected a "
              f"non-zero multiple of input token count {src_len} "
          )
          contextual_embedding_tensor = torch.tensor(
              [contextual_token_embedding], dtype=torch.float
          )
      return (
          torch.tensor(word_ids).reshape(-1, 1),
          dict_tensors,
          contextual_embedding_tensor,
          torch.tensor([src_len]),
      )
  
file_path: pytext/pytext/torchscript/seq2seq/export_model.py
imports: from typing import List, Optional, Tuple
  import torch
  from pytext.torchscript.vocab import ScriptVocabulary
label_desc: Use image node_id 2 for calling the Seq2SeqJIT obj's underlying member method code with example usage: obj.prepare_generator_inputs(word_ids, dict_feat, contextual_token_embedding) and returns: torch,  dict_tensors,  contextual_embedding_tensor,  torch