code: def get_decoder_input(
      labels: torch.Tensor, blank_id: int, ignore_id: int
  ) -> torch.Tensor:
      """Prepare decoder input.
  
      Args:
          labels: Label ID sequences. (B, L)
  
      Returns:
          decoder_input: Label ID sequences with blank prefix. (B, U)
  
      """
      device = labels.device
  
      labels_unpad = [label[label != ignore_id] for label in labels]
      blank = labels[0].new([blank_id])
  
      decoder_input = pad_list(
          [torch.cat([blank, label], dim=0) for label in labels_unpad],
          blank_id,
      ).to(device)
  
      return decoder_input
  
file_path: espnet/espnet/nets/pytorch_backend/transducer/utils.py
imports: import os
  from typing import Any, Dict, List, Optional, Union
  import numpy
  import torch
  from espnet.nets.pytorch_backend.nets_utils import pad_list
  from espnet.nets.transducer_decoder_interface import ExtendedHypothesis, Hypothesis
label_desc: Use image node_id 1 for calling a global function with example usage: get_decoder_input(labels, blank_id, ignore_id) and returns: decoder_input