code: def __init__(
      self,
      heatmap_hw: Tuple[int, int] = (256 // 4, 192 // 4),
      gaussian_sigma: int = 2,
      keypoints_weights=None,
  ):
      self.heatmap_hw = heatmap_hw
      self.sigma = gaussian_sigma
      self.kernel_radius = self.sigma * 3
      self.use_kps_weights = (
          False if keypoints_weights is None else True
      )
      self.kps_weights = keypoints_weights
  
      # generate gaussian kernel(not normalized)
      kernel_size = 2 * self.kernel_radius + 1
      kernel = np.zeros((kernel_size, kernel_size), dtype=np.float32)
      x_center = y_center = kernel_size // 2
      for x in range(kernel_size):
          for y in range(kernel_size):
              kernel[y, x] = np.exp(
                  -((x - x_center) ** 2 + (y - y_center) ** 2)
                  / (2 * self.sigma**2)
              )
      # print(kernel)
  
      self.kernel = kernel
  
imports: import math
  import random
  from typing import Tuple
  import cv2
  import numpy
  import torch
  from torchvision.transforms import functional
  import matplotlib.pyplot
label_desc: Use image node_id 1 to create a new KeypointToHeatMap object from inherited base classes: object with example: obj = KeypointToHeatMap(heatmap_hw, gaussian_sigma, keypoints_weights)