code: def average_stats(shapenet_stats):
      """Average the accumulated stats of the whole dataset."""
      for k, v in shapenet_stats.items():
          cnt = max(v["cnt"], 1)
          shapenet_stats[k] = {
              "iou": v["iou"] / cnt,
              "chamfer": v["chamfer"] / cnt,
              "fscore": v["fscore"] / cnt,
          }
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from os import path
  import numpy
  import scipy
  from skimage import measure
  import tensorflow.compat.v1
  from tensorflow_graphics.projects.cvxnet.lib import datasets
  from tensorflow_graphics.projects.cvxnet.lib import models
  from tensorflow_graphics.projects.cvxnet.lib.libmise import mise
  import trimesh
label_desc: Use image node_id 10 for calling a global function with example usage: average_stats(shapenet_stats) without return types