code: def from_config(cls, config: Config, vocab: Vocabulary):
      return cls(
          vocab._vocab, create_loss(config.loss, vocab.get_pad_index())
      )
  
file_path: pytext/pytext/models/seq_models/seq2seq_output_layer.py
imports: from typing import Any, Dict, Tuple, Union
  import torch
  from pytext.config import ConfigBase
  from pytext.config.component import create_loss
  from pytext.data.utils import Vocabulary
  from pytext.loss import CrossEntropyLoss, LabelSmoothedCrossEntropyLoss, NLLLoss
  from pytext.models.output_layers import OutputLayerBase
label_desc: Use image node_id 1 for calling the Seq2SeqOutputLayer obj's underlying member method code with example usage: obj.from_config(cls, config, vocab) and returns: cls