code: def save_pointcloud(data, hparams, pth="pointcloud"):
      """Save pointcloud to disk."""
      name = data["name"][0].decode("utf-8")
      unused_subject, unused_motion, frame = amass_name_helper(name)
      pth = path.join(hparams.train_dir, pth, frame)
      if not tf.io.gfile.isdir(pth):
          tf.io.gfile.makedirs(pth)
  
      mesh_name = "pointcloud.obj"
      with tf.io.gfile.GFile(path.join(pth, mesh_name), "w") as fout:
          pointcloud = data["vert"].reshape([-1, 3])
          for v in pointcloud:
              fout.write("v {0} {1} {2}\n".format(*v.tolist()))
  
imports: from os import path
  import numpy
  from skimage import measure
  import tensorflow.compat.v1
  from tensorflow_graphics.projects.cvxnet.lib.libmise import mise
  from tensorflow_graphics.projects.nasa.lib import datasets
  from tensorflow_graphics.projects.nasa.lib import models
  import tensorflow_probability
  from tqdm import trange
  import trimesh
label_desc: Use image node_id 4 for calling a global function with example usage: save_pointcloud(data, hparams, pth) without return types