class_docstr: E2E module.
  
  :param int idim: dimension of inputs
  :param int odim: dimension of outputs
  :param Namespace args: argument Namespace containing options
class_docstr_tok: ["E2E","module",".",":","param","int","idim",":","dimension","of","inputs",":","param","int","odim",":","dimension","of","outputs",":","param","Namespace","args",":","argument","Namespace","containing","options"]
docstr: Prepend target language IDs to source sentences for multilingual MT.
  
  These tags are prepended in source/target sentences as pre-processing.
  
  :param torch.Tensor xs_pad: batch of padded input sequences (B, Tmax)
  :return: source text without language IDs
  :rtype: torch.Tensor
  :return: target text without language IDs
  :rtype: torch.Tensor
  :return: target language IDs
  :rtype: torch.Tensor (B, 1)
docstr_tok: ["Prepend","target","language","IDs","to","source","sentences","for","multilingual","MT",".","These","tags","are","prepended","in","source\/target","sentences","as","pre-processing",".",":","param","torch.Tensor","xs_pad",":","batch","of","padded","input","sequences","(","B",",","Tmax",")",":","return",":","source","text","without","language","IDs",":","rtype",":","torch.Tensor",":","return",":","target","text","without","language","IDs",":","rtype",":","torch.Tensor",":","return",":","target","language","IDs",":","rtype",":","torch.Tensor","(","B",",","1",")"]
code: def target_forcing(self, xs_pad, ys_pad=None, tgt_lang=None):
      """Prepend target language IDs to source sentences for multilingual MT.
  
      These tags are prepended in source/target sentences as pre-processing.
  
      :param torch.Tensor xs_pad: batch of padded input sequences (B, Tmax)
      :return: source text without language IDs
      :rtype: torch.Tensor
      :return: target text without language IDs
      :rtype: torch.Tensor
      :return: target language IDs
      :rtype: torch.Tensor (B, 1)
      """
      if self.multilingual:
          xs_pad = xs_pad[:, 1:]  # remove source language IDs here
          if ys_pad is not None:
              # remove language ID in the beginning
              lang_ids = ys_pad[:, 0].unsqueeze(1)
              ys_pad = ys_pad[:, 1:]
          elif tgt_lang is not None:
              lang_ids = xs_pad.new_zeros(xs_pad.size(0), 1).fill_(
                  tgt_lang
              )
          else:
              raise ValueError("Set ys_pad or tgt_lang.")
  
          # prepend target language ID to source sentences
          xs_pad = torch.cat([lang_ids, xs_pad], dim=1)
      return xs_pad, ys_pad
  
imports: import logging
  import math
  from argparse import Namespace
  import numpy
  import torch
  from espnet.nets.e2e_asr_common import end_detect
  from espnet.nets.e2e_mt_common import ErrorCalculator
  from espnet.nets.mt_interface import MTInterface
  from espnet.nets.pytorch_backend.e2e_mt import Reporter
  from espnet.nets.pytorch_backend.nets_utils import get_subsample, make_pad_mask, th_accuracy, to_device
  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.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.target_forcing(xs_pad, ys_pad, tgt_lang) and returns: xs_pad,  ys_pad