code: def calc_dists(joints_3d_pre, joints_3d_gt, head_size=300):
      dists = (
          1000
          / head_size
          * np.linalg.norm(joints_3d_pre - joints_3d_gt, axis=-1)
      )
      return dists
  
imports: import os
  import torch
  import torch.optim
  import numpy
  from sklearn.metrics import auc
label_desc: Use image node_id 22 for calling a global function with example usage: calc_dists(joints_3d_pre, joints_3d_gt, head_size) and returns: dists