code: def get_encoder_out(
      self,
      src_tokens: Tensor,
      dict_feats: Optional[Tuple[Tensor, Tensor, Tensor]],
      contextual_embed: Optional[Tensor],
      char_feats: Optional[Tensor],
      src_subword_begin_indices: Optional[Tensor],
      src_lengths: Tensor,
      src_index_tokens: Optional[Tensor] = None,
  ) -> Dict[str, Tensor]:
      embedding_input = [[src_tokens]]
      if dict_feats is not None:
          embedding_input.append(list(dict_feats))
      if contextual_embed is not None:
          embedding_input.append([contextual_embed])
      if char_feats is not None:
          embedding_input.append([char_feats])
      embeddings = self.model.source_embeddings(embedding_input)
      encoder_out = self.model.encoder(
          src_tokens, embeddings, src_lengths=src_lengths
      )
  
      if src_index_tokens is not None:
          encoder_out["src_index_tokens"] = src_index_tokens
  
      return encoder_out
  
imports: from enum import Enum
  from typing import Dict, Optional, Tuple
  import torch
  from pytext.common.constants import TORCH_VERSION
  from pytext.config import ConfigBase
  from pytext.models.module import Module
  from pytext.torchscript.vocab import ScriptVocabulary
  from torch import Tensor
label_desc: Use image node_id 5 for calling the MaskedSequenceGenerator obj's underlying member method code with example usage: obj.get_encoder_out(src_tokens, dict_feats, contextual_embed, char_feats, src_subword_begin_indices, src_lengths, src_index_tokens) and returns: encoder_out