code: def normalize_kernel2d(input: Tensor) -> Tensor:
      r"""Normalize both derivative and smoothing kernel."""
      KORNIA_CHECK_SHAPE(input, ["*", "H", "W"])
  
      norm = input.abs().sum(dim=-1).sum(dim=-1)
  
      return input / (norm[..., None, None])
  
imports: from __future__ import annotations
  import math
  from math import sqrt
  from typing import Any, Optional
  import torch
  from kornia.core import Device, Dtype, Tensor, concatenate, cos, stack, tensor, where, zeros, zeros_like
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_IS_TENSOR, KORNIA_CHECK_SHAPE
  from kornia.utils import deprecated
label_desc: Use image node_id 4 for calling a global function with example usage: normalize_kernel2d(input) and returns: unknown