code: def pad_sequence(labels: List[int], pad_id: int) -> List[int]:
      """Left pad label ID sequences.
  
      Args:
          labels: Label ID sequence.
          pad_id: Padding symbol ID.
  
      Returns:
          final: Padded label ID sequences.
  
      """
      maxlen = max(len(x) for x in labels)
  
      final = [([pad_id] * (maxlen - len(x))) + x for x in labels]
  
      return final
  
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 10 for calling a global function with example usage: pad_sequence(labels, pad_id) and returns: final