class_docstr: E2E module.
  
  :param int idim: dimension of inputs
  :param int odim: dimension of outputs
  :param Namespace args: argument Namespace containing options
docstr: Forward pass in the auxiliary MT task.
  
  :param torch.Tensor xs_pad: batch of padded source sequences (B, Tmax, idim)
  :param torch.Tensor ys_in_pad: batch of padded target sequences (B, Lmax)
  :param torch.Tensor ys_out_pad: batch of padded target sequences (B, Lmax)
  :param torch.Tensor ys_mask: batch of input token mask (B, Lmax)
  :return: MT loss value
  :rtype: torch.Tensor
  :return: accuracy in MT decoder
  :rtype: float
code: def forward_mt(self, xs_pad, ys_in_pad, ys_out_pad, ys_mask):
      """Forward pass in the auxiliary MT task.
  
      :param torch.Tensor xs_pad: batch of padded source sequences (B, Tmax, idim)
      :param torch.Tensor ys_in_pad: batch of padded target sequences (B, Lmax)
      :param torch.Tensor ys_out_pad: batch of padded target sequences (B, Lmax)
      :param torch.Tensor ys_mask: batch of input token mask (B, Lmax)
      :return: MT loss value
      :rtype: torch.Tensor
      :return: accuracy in MT decoder
      :rtype: float
      """
      loss, acc = 0.0, None
      if self.mt_weight == 0:
          return loss, acc
  
      ilens = torch.sum(xs_pad != self.ignore_id, dim=1).cpu().numpy()
      # NOTE: xs_pad is padded with -1
      xs = [x[x != self.ignore_id] for x in xs_pad]  # parse padded xs
      xs_zero_pad = pad_list(xs, self.pad)  # re-pad with zero
      xs_zero_pad = xs_zero_pad[:, : max(ilens)]  # for data parallel
      src_mask = (
          make_non_pad_mask(ilens.tolist())
          .to(xs_zero_pad.device)
          .unsqueeze(-2)
      )
      hs_pad, hs_mask = self.encoder_mt(xs_zero_pad, src_mask)
      pred_pad, _ = self.decoder(ys_in_pad, ys_mask, hs_pad, hs_mask)
      loss = self.criterion(pred_pad, ys_out_pad)
      acc = th_accuracy(
          pred_pad.view(-1, self.odim),
          ys_out_pad,
          ignore_label=self.ignore_id,
      )
      return loss, acc
  
imports: import logging
  import math
  from argparse import Namespace
  import numpy
  import torch
  from espnet.nets.e2e_asr_common import ErrorCalculator
  from espnet.nets.e2e_asr_common import end_detect
  from espnet.nets.e2e_mt_common import ErrorCalculator
  from espnet.nets.pytorch_backend.ctc import CTC
  from espnet.nets.pytorch_backend.e2e_asr import CTC_LOSS_THRESHOLD
  from espnet.nets.pytorch_backend.e2e_st import Reporter
  from espnet.nets.pytorch_backend.nets_utils import get_subsample, make_non_pad_mask, pad_list, th_accuracy
  from espnet.nets.pytorch_backend.transformer.add_sos_eos import add_sos_eos
  from espnet.nets.pytorch_backend.transformer.argument import add_arguments_transformer_common
  from espnet.nets.pytorch_backend.transformer.attention import MultiHeadedAttention
  from espnet.nets.pytorch_backend.transformer.decoder import Decoder
  from espnet.nets.pytorch_backend.transformer.encoder import Encoder
  from espnet.nets.pytorch_backend.transformer.initializer import initialize
  from espnet.nets.pytorch_backend.transformer.label_smoothing_loss import LabelSmoothingLoss
  from espnet.nets.pytorch_backend.transformer.mask import subsequent_mask, target_mask
  from espnet.nets.pytorch_backend.transformer.plot import PlotAttentionReport
  from espnet.nets.st_interface import STInterface
  from espnet.utils.fill_missing_args import fill_missing_args
label_desc: Use image node_id 8 for calling the E2E obj's underlying member method code with example usage: obj.forward_mt(xs_pad, ys_in_pad, ys_out_pad, ys_mask) and returns: loss,  acc, loss,  acc