code: def write_stats(stats, eval_dir, step):
      """Write stats of the dataset to disk.
  
      Args:
        stats: dict, statistics to save.
        eval_dir: string, path to the directory to save the statistics.
        step: int, the global step of the checkpoint.
      """
      if not tf.io.gfile.isdir(eval_dir):
          tf.io.gfile.makedirs(eval_dir)
      with tf.io.gfile.GFile(
          path.join(eval_dir, "stats_{}.csv".format(step)), "w"
      ) as fout:
          fout.write("class,iou,chamfer,fscore\n")
          for k in sorted(stats.keys()):
              if k == "all":
                  continue
              fout.write(
                  "{0},{1},{2},{3}\n".format(
                      SYSNET_CLASSES[k],
                      stats[k]["iou"],
                      stats[k]["chamfer"],
                      stats[k]["fscore"],
                  )
              )
          fout.write(
              "all,{0},{1},{2}".format(
                  stats["all"]["iou"],
                  stats["all"]["chamfer"],
                  stats["all"]["fscore"],
              )
          )
  
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 11 for calling a global function with example usage: write_stats(stats, eval_dir, step) without return types