code: def _transform_inverse(x: torch.Tensor, dim: int, duration: int):
      assert not x.requires_grad
      assert dim < 0
      dots = (slice(None),) * (x.dim() + dim)
      left = dots + (slice(None, duration),)
      right = dots + (slice(duration, None),)
      return idct(x[right], dim)[left].add_(x[left])
  
file_path: pyro/pyro/optim/dct_adam.py
imports: import math
  from typing import Callable, Dict, Optional, Tuple
  import torch
  from torch.nn.functional import pad
  from torch.optim.optimizer import Optimizer
  from pyro.ops.tensor_utils import dct, idct, next_fast_len
label_desc: Use image node_id 2 for calling a global function with example usage: _transform_inverse(x, dim, duration) and returns: idct