code: def _modified_bessel_1(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)
          ans = 0.51498869 + y * (
              0.15084934
              + y * (0.2658733e-1 + y * (0.301532e-2 + y * 0.32411e-3))
          )
          out[idx_a] = ax[idx_a] * (0.5 + y * (0.87890594 + y * ans))
  
      idx_b = ~idx_a
      if idx_b.any():
          y = 3.75 / ax[idx_b]
          ans = 0.2282967e-1 + y * (
              -0.2895312e-1 + y * (0.1787654e-1 - y * 0.420059e-2)
          )
          ans = 0.39894228 + y * (
              -0.3988024e-1
              + y
              * (
                  -0.362018e-2
                  + y * (0.163801e-2 + y * (-0.1031555e-1 + y * ans))
              )
          )
          ans = ans * ax[idx_b].exp() / ax[idx_b].sqrt()
          out[idx_b] = where(x[idx_b] < 0, -ans, ans)
  
      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 8 for calling a global function with example usage: _modified_bessel_1(x) and returns: out