code: def scale_coords(self, coords, input_shape, im_shape, scale_factor):
      ratio = scale_factor[0]
      pad_w = (input_shape[1] - int(im_shape[1])) / 2
      pad_h = (input_shape[0] - int(im_shape[0])) / 2
      coords = paddle.cast(coords, "float32")
      coords[:, 0::2] -= pad_w
      coords[:, 1::2] -= pad_h
      coords[:, 0:4] /= ratio
      coords[:, :4] = paddle.clip(
          coords[:, :4], min=0, max=coords[:, :4].max()
      )
      return coords.round()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from paddle.regularizer import L2Decay
  from ppdet.core.workspace import register
  from paddle.nn.initializer import Normal, Constant
label_desc: Use image node_id 3 for calling the JDEEmbeddingHead obj's underlying member method code with example usage: obj.scale_coords(coords, input_shape, im_shape, scale_factor) and returns: coords