code: def time_warp(
      x: torch.Tensor,
      window: int = 80,
      mode: str = DEFAULT_TIME_WARP_MODE,
  ):
      """Time warping using torch.interpolate.
  
      Args:
          x: (Batch, Time, Freq)
          window: time warp parameter
          mode: Interpolate mode
      """
  
      # bicubic supports 4D or more dimension tensor
      org_size = x.size()
      if x.dim() == 3:
          # x: (Batch, Time, Freq) -> (Batch, 1, Time, Freq)
          x = x[:, None]
  
      t = x.shape[2]
      if t - window <= window:
          return x.view(*org_size)
  
      center = torch.randint(window, t - window, (1,))[0]
      warped = (
          torch.randint(center - window, center + window, (1,))[0] + 1
      )
  
      # left: (Batch, Channel, warped, Freq)
      # right: (Batch, Channel, time - warped, Freq)
      left = torch.nn.functional.interpolate(
          x[:, :, :center],
          (warped, x.shape[3]),
          mode=mode,
          align_corners=False,
      )
      right = torch.nn.functional.interpolate(
          x[:, :, center:],
          (t - warped, x.shape[3]),
          mode=mode,
          align_corners=False,
      )
  
      if x.requires_grad:
          x = torch.cat([left, right], dim=-2)
      else:
          x[:, :, :warped] = left
          x[:, :, warped:] = right
  
      return x.view(*org_size)
  
imports: import torch
  from espnet.nets.pytorch_backend.nets_utils import pad_list
label_desc: Use image node_id 1 for calling a global function with example usage: time_warp(x, window, mode) and returns: x, x