code: def nms2d(
      input: Tensor,
      kernel_size: tuple[int, int],
      mask_only: bool = False,
  ) -> Tensor:
      r"""Apply non maxima suppression to filter.
  
      See :class:`~kornia.geometry.subpix.NonMaximaSuppression2d` for details.
      """
      return NonMaximaSuppression2d(kernel_size)(input, mask_only)
  
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 3 for calling a global function with example usage: nms2d(input, kernel_size, mask_only) and returns: NonMaximaSuppression2d