code: def upscale_double(x: Tensor) -> Tensor:
      r"""Upscale image by the factor of 2, even indices maps to original indices.
  
      Odd indices are linearly interpolated from the even ones.
  
      Args:
          x: input image.
  
      Shape:
          - Input: :math:`(*, H, W)`
          - Output :math:`(*, H, W)`
      """
      KORNIA_CHECK_IS_TENSOR(x)
      KORNIA_CHECK_SHAPE(x, ["*", "H", "W"])
      double_shape = x.shape[:-2] + (x.shape[-2] * 2, x.shape[-1] * 2)
      upscaled = zeros(double_shape, device=x.device, dtype=x.dtype)
      upscaled[..., ::2, ::2] = x
      upscaled[..., ::2, 1::2][..., :-1] = (
          upscaled[..., ::2, ::2][..., :-1] + upscaled[..., ::2, 2::2]
      ) / 2
      upscaled[..., ::2, -1] = upscaled[..., ::2, -2]
      upscaled[..., 1::2, :][..., :-1, :] = (
          upscaled[..., ::2, :][..., :-1, :] + upscaled[..., 2::2, :]
      ) / 2
      upscaled[..., -1, :] = upscaled[..., -2, :]
      return upscaled
  
imports: from __future__ import annotations
  import math
  import torch
  import torch.nn.functional
  from kornia.core import Module, Tensor, ones, pad, stack, tensor, zeros
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_IS_TENSOR, KORNIA_CHECK_SHAPE
  from kornia.filters import filter2d, gaussian_blur2d
label_desc: Use image node_id 8 for calling a global function with example usage: upscale_double(x) and returns: upscaled