code: def pad_tensor(x, pad, side="both"):
      # NB - this is just a quick method i need right now
      # i.e., it won't generalise to other shapes/dims
      b, t, c = x.size()
      total = t + 2 * pad if side == "both" else t + pad
      padded = torch.zeros(b, total, c).to(x.device)
      if side in ("before", "both"):
          padded[:, pad : pad + t, :] = x
      elif side == "after":
          padded[:, :t, :] = x
      return padded
  
imports: import sys
  import torch
  import torch.nn
  import numpy
  import torch.nn.functional
  import time
  from TTS.utils.audio import AudioProcessor
  from TTS.vocoder.utils.distribution import sample_from_gaussian, sample_from_discretized_mix_logistic
label_desc: Use image node_id 7 for calling the WaveRNN obj's underlying member method code with example usage: obj.pad_tensor(x, pad, side) and returns: padded