code: def weighted_mpjpe(pred, gt, has_3d_joints):
      """
      Weighted_mPJPE
      """
      pred, gt = filter_3d_joints(pred, gt, has_3d_joints)
      weight = paddle.linalg.norm(pred, p=2, axis=-1)
      weight = paddle.to_tensor(
          [
              1.5,
              1.3,
              1.2,
              1.2,
              1.3,
              1.5,
              1.5,
              1.3,
              1.2,
              1.2,
              1.3,
              1.5,
              1.0,
              1.0,
          ]
      )
      error = (
          weight * paddle.linalg.norm(pred - gt, p=2, axis=-1)
      ).mean()
      return error
  
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 6 for calling a global function with example usage: weighted_mpjpe(pred, gt, has_3d_joints) and returns: error