code: def target_mask(ys_in_pad, ignore_id):
      """Create mask for decoder self-attention.
  
      :param torch.Tensor ys_pad: batch of padded target sequences (B, Lmax)
      :param int ignore_id: index of padding
      :param torch.dtype dtype: result dtype
      :rtype: torch.Tensor (B, Lmax, Lmax)
      """
      ys_mask = ys_in_pad != ignore_id
      m = subsequent_mask(
          ys_mask.size(-1), device=ys_mask.device
      ).unsqueeze(0)
      return ys_mask.unsqueeze(-2) & m
  
label_desc: Use image node_id 2 for calling a global function with example usage: target_mask(ys_in_pad, ignore_id) and returns: unknown