code: def _guided_blur_grayscale_guidance(
      guidance: Tensor,
      input: Tensor,
      kernel_size: tuple[int, int] | int,
      eps: float | Tensor,
      border_type: str = "reflect",
      subsample: int = 1,
  ) -> Tensor:
      (
          guidance_sub,
          input_sub,
          kernel_size,
      ) = _preprocess_fast_guided_blur(
          guidance, input, kernel_size, subsample
      )
  
      mean_I = box_blur(guidance_sub, kernel_size, border_type)
      corr_I = box_blur(guidance_sub.square(), kernel_size, border_type)
      var_I = corr_I - mean_I.square()
  
      if input is guidance:
          mean_p = mean_I
          cov_Ip = var_I
  
      else:
          mean_p = box_blur(input_sub, kernel_size, border_type)
          corr_Ip = box_blur(
              guidance_sub * input_sub, kernel_size, border_type
          )
          cov_Ip = corr_Ip - mean_I * mean_p
  
      if isinstance(eps, Tensor):
          eps = eps.view(-1, 1, 1, 1)  # N -> NCHW
  
      a = cov_Ip / (var_I + eps)
      b = mean_p - a * mean_I
  
      mean_a = box_blur(a, kernel_size, border_type)
      mean_b = box_blur(b, kernel_size, border_type)
  
      if subsample > 1:
          mean_a = interpolate(
              mean_a, scale_factor=subsample, mode="bilinear"
          )
          mean_b = interpolate(
              mean_b, scale_factor=subsample, mode="bilinear"
          )
  
      return mean_a * guidance + mean_b
  
file_path: kornia/kornia/filters/guided.py
imports: from __future__ import annotations
  import torch
  from torch.nn.functional import interpolate
  from kornia.core import Module, Tensor
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_IS_TENSOR, KORNIA_CHECK_SHAPE
  from .blur import box_blur
  from .kernels import _unpack_2d_ks
label_desc: Use image node_id 2 for calling a global function with example usage: _guided_blur_grayscale_guidance(guidance, input, kernel_size, eps, border_type, subsample) and returns: unknown