def _left_zero_padded_list(l, maxseqlen):
  """Zero pads the given list (from left) to length of maxseqlen."""
  padded = [0] * maxseqlen
  idx = maxseqlen - 1
  for i in reversed(l):
    padded[idx] = i
    idx -= 1
    if idx == -1:
      break
  return padded