code: def _modified_bessel_0(x: Tensor) -> Tensor:
      r"""Adapted from:
  
      https://github.com/Project-MONAI/MONAI/blob/master/monai/networks/layers/convutils.py
      """
      ax = torch.abs(x)
  
      out = zeros_like(x)
      idx_a = ax < 3.75
  
      if idx_a.any():
          y = (x[idx_a] / 3.75) * (x[idx_a] / 3.75)
          out[idx_a] = 1.0 + y * (
              3.5156229
              + y
              * (
                  3.0899424
                  + y
                  * (
                      1.2067492
                      + y
                      * (0.2659732 + y * (0.360768e-1 + y * 0.45813e-2))
                  )
              )
          )
  
      idx_b = ~idx_a
      if idx_b.any():
          y = 3.75 / ax[idx_b]
          ans = 0.916281e-2 + y * (
              -0.2057706e-1
              + y
              * (0.2635537e-1 + y * (-0.1647633e-1 + y * 0.392377e-2))
          )
          coef = 0.39894228 + y * (
              0.1328592e-1
              + y * (0.225319e-2 + y * (-0.157565e-2 + y * ans))
          )
          out[idx_b] = (ax[idx_b].exp() / ax[idx_b].sqrt()) * coef
  
      return out
  
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 7 for calling a global function with example usage: _modified_bessel_0(x) and returns: out