code: def get_preds_fromhm(hm, center=None, scale=None):
      """Obtain (x,y) coordinates given a set of N heatmaps. If the center
      and the scale is provided the function will return the points also in
      the original coordinate frame.
  
      Arguments:
          hm {torch.tensor} -- the predicted heatmaps, of shape [B, N, W, H]
  
      Keyword Arguments:
          center {torch.tensor} -- the center of the bounding box (default: {None})
          scale {float} -- face scale (default: {None})
      """
      B, C, H, W = hm.shape
      hm_reshape = hm.reshape(B, C, H * W)
      idx = np.argmax(hm_reshape, axis=-1)
      scores = np.take_along_axis(
          hm_reshape, np.expand_dims(idx, axis=-1), axis=-1
      ).squeeze(-1)
      preds, preds_orig = _get_preds_fromhm(hm, idx, center, scale)
  
      return preds, preds_orig, scores
  
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 6 for calling a global function with example usage: get_preds_fromhm(hm, center, scale) and returns: preds,  preds_orig,  scores