code: def _get_nms_kernel2d(kx: int, ky: int) -> Tensor:
      """Utility function, which returns neigh2channels conv kernel."""
      numel: int = ky * kx
      center: int = numel // 2
      weight = eye(numel)
      weight[center, center] = 0
      return weight.view(numel, 1, ky, kx)
  
file_path: kornia/kornia/geometry/subpix/nms.py
imports: from __future__ import annotations
  import torch
  import torch.nn.functional
  from kornia.core import Module, Tensor, eye, pad, zeros
label_desc: Use image node_id 1 for calling a global function with example usage: _get_nms_kernel2d(kx, ky) and returns: weight