code: def define_flags():
      """Define command line flags."""
      flags = tf.app.flags
      # Model flags
      flags.DEFINE_enum(
          "model",
          "multiconvex",
          list(k for k in models.model_dict.keys()),
          "Name of the model.",
      )
      flags.DEFINE_float("sharpness", 75.0, "Sharpness term.")
      flags.DEFINE_integer("n_parts", 50, "Number of convexes uesd.")
      flags.DEFINE_integer(
          "n_half_planes", 25, "Number of half spaces used."
      )
      flags.DEFINE_integer(
          "latent_size", 256, "The size of latent code."
      )
      flags.DEFINE_integer("dims", 3, "The dimension of query points.")
      flags.DEFINE_bool(
          "image_input", False, "Use color images as input if True."
      )
      flags.DEFINE_float(
          "vis_scale", 1.3, "Scale of bbox used when extracting meshes."
      )
      flags.DEFINE_float(
          "level_set", 0.5, "Level set used for extracting surfaces."
      )
  
      # Dataset flags
      flags.DEFINE_enum(
          "dataset",
          "shapenet",
          list(k for k in datasets.dataset_dict.keys()),
          "Name of the dataset.",
      )
      flags.DEFINE_integer(
          "image_h", 137, "The height of the color images."
      )
      flags.DEFINE_integer(
          "image_w", 137, "The width of the color images."
      )
      flags.DEFINE_integer(
          "image_d", 3, "The channels of color images."
      )
      flags.DEFINE_integer(
          "depth_h", 224, "The height of depth images."
      )
      flags.DEFINE_integer("depth_w", 224, "The width of depth images.")
      flags.DEFINE_integer("depth_d", 20, "The number of depth views.")
      flags.DEFINE_integer(
          "n_views", 24, "The number of color images views."
      )
      flags.DEFINE_string(
          "data_dir", None, "The base directory to load data from."
      )
      flags.mark_flag_as_required("data_dir")
      flags.DEFINE_string(
          "obj_class", "*", "Object class used from dataset."
      )
  
      # Training flags
      flags.DEFINE_float("lr", 1e-4, "Start learning rate.")
      flags.DEFINE_string(
          "train_dir",
          None,
          "The base directory to save training info and" "checkpoints.",
      )
      flags.DEFINE_integer(
          "save_every", 20000, "The number of steps to save checkpoint."
      )
      flags.DEFINE_integer(
          "max_steps", 800000, "The number of steps of training."
      )
      flags.DEFINE_integer("batch_size", 32, "Batch size.")
      flags.DEFINE_integer(
          "sample_bbx",
          1024,
          "The number of bounding box sample points.",
      )
      flags.DEFINE_integer(
          "sample_surf", 1024, "The number of surface sample points."
      )
      flags.DEFINE_float(
          "weight_overlap", 0.1, "Weight of overlap_loss"
      )
      flags.DEFINE_float(
          "weight_balance", 0.01, "Weight of balance_loss"
      )
      flags.DEFINE_float(
          "weight_center", 0.001, "Weight of center_loss"
      )
      flags.mark_flag_as_required("train_dir")
  
      # Eval flags
      flags.DEFINE_bool(
          "extract_mesh",
          False,
          "Extract meshes and set to disk if True.",
      )
      flags.DEFINE_bool(
          "surface_metrics",
          False,
          "Measure surface metrics and save to csv if True.",
      )
      flags.DEFINE_string(
          "mesh_dir", None, "Path to load ground truth meshes."
      )
      flags.DEFINE_string(
          "trans_dir",
          None,
          "Path to load pred-to-target transformations.",
      )
      flags.DEFINE_bool(
          "eval_once", False, "Evaluate the model only once if True."
      )
  
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 1 for calling a global function with example usage: define_flags() without return types