code: def inverse_haar_transform(x):
      """
      Performs an inverse Haar transform along the final dimension.
      This is the inverse of :func:`haar_transform`.
  
      :param Tensor x: The input signal.
      :rtype: Tensor
      """
      n = x.size(-1) // 2
      lo, hi, end = x[..., :n], x[..., n : n + n], x[..., n + n :]
      if n >= 2:
          lo = inverse_haar_transform(lo)
      even = _ROOT_TWO_INVERSE * (lo + hi)
      odd = _ROOT_TWO_INVERSE * (lo - hi)
      even_odd = torch.stack([even, odd], dim=-1).reshape(
          even.shape[:-1] + (-1,)
      )
      x = torch.cat([even_odd, end], dim=-1)
      return x
  
imports: import math
  import torch
  from torch.fft import irfft, rfft
  from ..None import settings
label_desc: Use image node_id 14 for calling a global function with example usage: inverse_haar_transform(x) and returns: x