code: def draw_gaussian(image, point, sigma):
      global gauss_kernel
      # Check if the gaussian is inside
      ul = [
          math.floor(point[0] - 3 * sigma),
          math.floor(point[1] - 3 * sigma),
      ]
      br = [
          math.floor(point[0] + 3 * sigma),
          math.floor(point[1] + 3 * sigma),
      ]
      if (
          ul[0] > image.shape[1]
          or ul[1] > image.shape[0]
          or br[0] < 1
          or br[1] < 1
      ):
          return image
      size = 6 * sigma + 1
      if gauss_kernel is None:
          g = _gaussian(size)
          gauss_kernel = g
      else:
          g = gauss_kernel
      g_x = [
          int(max(1, -ul[0])),
          int(min(br[0], image.shape[1]))
          - int(max(1, ul[0]))
          + int(max(1, -ul[0])),
      ]
      g_y = [
          int(max(1, -ul[1])),
          int(min(br[1], image.shape[0]))
          - int(max(1, ul[1]))
          + int(max(1, -ul[1])),
      ]
      img_x = [int(max(1, ul[0])), int(min(br[0], image.shape[1]))]
      img_y = [int(max(1, ul[1])), int(min(br[1], image.shape[0]))]
      assert g_x[0] > 0 and g_y[1] > 0
      image[img_y[0] - 1 : img_y[1], img_x[0] - 1 : img_x[1]] = (
          image[img_y[0] - 1 : img_y[1], img_x[0] - 1 : img_x[1]]
          + g[g_y[0] - 1 : g_y[1], g_x[0] - 1 : g_x[1]]
      )
      image[image > 1] = 1
      return image
  
imports: import os
  import sys
  import errno
  import torch
  import math
  import numpy
  import cv2
  from skimage import io
  from skimage import color
  from numba import jit
  from urllib.parse import urlparse
  from torch.hub import download_url_to_file, HASH_REGEX
label_desc: Use image node_id 2 for calling a global function with example usage: draw_gaussian(image, point, sigma) and returns: image, image