code: def ced_accuracy(t, dists):
      # Head	 Shoulder	Elbow	Wrist	Hip	   Knee	   Ankle
      pts_r = tf.transpose(
          tf.gather(tf.transpose(dists), [8, 12, 11, 10, 2, 1, 0])
      )
      pts_l = tf.transpose(
          tf.gather(tf.transpose(dists), [9, 13, 14, 15, 3, 4, 5])
      )
      part_pckh = (
          tf.to_int32(pts_r <= t) + tf.to_int32(pts_l <= t)
      ) / 2
  
      return tf.concat(
          1,
          [
              part_pckh,
              tf.reduce_sum(tf.to_int32(dists <= t), 1)[..., None]
              / tf.shape(dists)[1],
          ],
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  import menpo.io
  from menpo.image import Image
  from menpo.shape import PointCloud
  import cv2
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.contrib.framework.python.ops import variables
  from tensorflow.python.training import optimizer
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import variables
  from menpo.transform import Translation, Scale
  from menpo.shape import PointCloud
label_desc: Use image node_id 13 for calling a global function with example usage: ced_accuracy(t, dists) and returns: tf