code: def _box_to_center_scale(
      x, y, w, h, aspect_ratio=1.0, scale_mult=1.25
  ):
      """Convert box coordinates to center and scale.
      adapted from https://github.com/Microsoft/human-pose-estimation.pytorch
      """
      pixel_std = 1
      center = np.zeros((2), dtype=np.float32)
      center[0] = x + w * 0.5
      center[1] = y + h * 0.5
  
      if w > aspect_ratio * h:
          h = w / aspect_ratio
      elif w < aspect_ratio * h:
          w = h * aspect_ratio
      scale = np.array(
          [w * 1.0 / pixel_std, h * 1.0 / pixel_std], dtype=np.float32
      )
      if center[0] != -1:
          scale = scale * scale_mult
      return center, scale
  
file_path: gluon-cv/gluoncv/data/transforms/presets/simple_pose.py
imports: from __future__ import absolute_import
  import random
  import numpy
  import mxnet
  from ..image import random_flip
  from ..pose import flip_joints_3d, get_affine_transform, affine_transform
  from ....utils.filesystem import try_import_cv2
label_desc: Use image node_id 1 for calling a global function with example usage: _box_to_center_scale(x, y, w, h, aspect_ratio, scale_mult) and returns: center,  scale