code: def normed_mpjpe(pred, gt, has_3d_joints):
      """
      Normalized MPJPE (scale only), adapted from:
      https://github.com/hrhodin/UnsupervisedGeometryAwareRepresentationLearning/blob/master/losses/poses.py
      """
      assert pred.shape == gt.shape
      pred, gt = filter_3d_joints(pred, gt, has_3d_joints)
  
      norm_predicted = paddle.mean(
          paddle.sum(pred**2, axis=3, keepdim=True),
          axis=2,
          keepdim=True,
      )
      norm_target = paddle.mean(
          paddle.sum(gt * pred, axis=3, keepdim=True),
          axis=2,
          keepdim=True,
      )
      scale = norm_target / norm_predicted
      return mpjpe(scale * pred, gt)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from itertools import cycle, islice
  from collections import abc
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register, serializable
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 7 for calling a global function with example usage: normed_mpjpe(pred, gt, has_3d_joints) and returns: mpjpe