code: def window_reverse(
      windows: torch.Tensor,
      original_size: Tuple[int, int],
      window_size: Tuple[int, int] = (7, 7),
  ) -> torch.Tensor:
      """Reverses the window partition.
      Args:
          windows (torch.Tensor): Window tensor of the shape [B * windows, window_size[0], window_size[1], C].
          original_size (Tuple[int, int]): Original shape.
          window_size (Tuple[int, int], optional): Window size which have been applied. Default (7, 7)
      Returns:
          output (torch.Tensor): Folded output tensor of the shape [B, C, original_size[0], original_size[1]].
      """
      # Get height and width
      h, w = original_size
      # Compute original batch size
      b = int(
          windows.shape[0] / (h * w / window_size[0] / window_size[1])
      )
      # Fold grid tensor
      output = windows.view(
          b,
          h // window_size[0],
          w // window_size[1],
          window_size[0],
          window_size[1],
          -1,
      )
      output = (
          output.permute(0, 5, 1, 3, 2, 4)
          .contiguous()
          .view(b, -1, h, w)
      )
      return output
  
imports: from typing import Tuple
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: window_reverse(windows, original_size, window_size) and returns: output