def simple_pad(x: Tensor,
    pad: int) -> Tensor:
  _0 = torch.slice(torch.slice(torch.slice(x), 1), 2, 1, torch.add(1, pad))
  left_pad = torch.flip(_0, [-1])
  _1 = torch.slice(torch.slice(torch.slice(x), 1), 2, torch.sub(-1, pad), -1)
  right_pad = torch.flip(_1, [-1])
  _2 = torch.cat([left_pad, x, right_pad], 2)
  return _2
