code: def SequenceLoss(vocab_size):
      weight = torch.ones(vocab_size)
      weight[constant.PAD_ID] = 0
      crit = nn.NLLLoss(weight)
      return crit
  
file_path: stanza/stanza/models/common/loss.py
imports: import logging
  import numpy
  import torch
  import torch.nn
  import stanza.models.common.seq2seq_constant
label_desc: Use image node_id 1 for calling a global function with example usage: SequenceLoss(vocab_size) and returns: crit