code: def _pad_tensor(t: Tensor, bs: int) -> Tensor:
      if t.size(0) < bs:
          return torch.cat(
              [t, t.new_zeros(bs - t.size(0), *t.shape[1:])]
          )
      return t
  
imports: from __future__ import annotations
  from ...data.all import *
  from ..core import *
  from .awdlstm import *
label_desc: Use image node_id 2 for calling a global function with example usage: _pad_tensor(t, bs) and returns: t, torch