code: def _blur_pool_by_kernel2d(
      input: Tensor, kernel: Tensor, stride: int
  ) -> Tensor:
      """Compute blur_pool by a given :math:`CxC_{out}xNxN` kernel."""
      KORNIA_CHECK(
          len(kernel.shape) == 4
          and kernel.shape[-2] == kernel.shape[-1],
          f"Invalid kernel shape. Expect CxC_(out, None)xNxN, Got {kernel.shape}",
      )
  
      padding = _compute_zero_padding(
          (kernel.shape[-2], kernel.shape[-1])
      )
      return F.conv2d(
          input,
          kernel,
          padding=padding,
          stride=stride,
          groups=input.shape[1],
      )
  
imports: from __future__ import annotations
  import torch.nn.functional
  from kornia.core import Module, Tensor, as_tensor, pad, tensor
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_SHAPE
  from .kernels import get_pascal_kernel_2d
  from .median import _compute_zero_padding
label_desc: Use image node_id 3 for calling a global function with example usage: _blur_pool_by_kernel2d(input, kernel, stride) and returns: F