code: def process_scene(s, args):
      scene_name = s["name"]
      detail_dir = os.path.join(
          dataset_scenes_dir, scene_name, "_detail"
      )
  
      metadata_cameras_csv_file = os.path.join(
          detail_dir, "metadata_cameras.csv"
      )
      df = pd.read_csv(metadata_cameras_csv_file)
  
      if args.camera_names is not None:
          cameras = [
              c
              for c in df.to_records()
              if fnmatch.fnmatch(c["camera_name"], args.camera_names)
          ]
      else:
          cameras = df.to_records()
  
      for c in cameras:
          camera_name = c["camera_name"]
  
          print(
              "[HYPERSIM: DATASET_GENERATE_IMAGES_SEMANTIC_SEGMENTATION] For scene "
              + scene_name
              + ", generating semantic instance segmentation images for camera "
              + camera_name
              + "..."
          )
  
          scene_dir = os.path.abspath(
              os.path.join(dataset_scenes_dir, scene_name)
          )
          segmentation_type = "semantic_instance"
  
          current_source_file_path = (
              path_utils.get_current_source_file_path(
                  frame=inspect.currentframe()
              )
          )
          cwd = os.getcwd()
          os.chdir(current_source_file_path)
  
          cmd = (
              _system_config.python_bin
              + " scene_generate_images_semantic_segmentation.py"
              + " --scene_dir "
              + scene_dir
              + " --camera_name "
              + camera_name
              + " --segmentation_type "
              + segmentation_type
          )
          print("")
          print(cmd)
          print("")
          retval = os.system(cmd)
          assert retval == 0
  
          os.chdir(cwd)
  
          print(
              "[HYPERSIM: DATASET_GENERATE_IMAGES_SEMANTIC_SEGMENTATION] For scene "
              + scene_name
              + ", generating semantic segmentation images for camera "
              + camera_name
              + "..."
          )
  
          scene_dir = os.path.abspath(
              os.path.join(dataset_scenes_dir, scene_name)
          )
          segmentation_type = "semantic"
  
          current_source_file_path = (
              path_utils.get_current_source_file_path(
                  frame=inspect.currentframe()
              )
          )
          cwd = os.getcwd()
          os.chdir(current_source_file_path)
  
          cmd = (
              _system_config.python_bin
              + " scene_generate_images_semantic_segmentation.py"
              + " --scene_dir "
              + scene_dir
              + " --camera_name "
              + camera_name
              + " --segmentation_type "
              + segmentation_type
          )
          print("")
          print(cmd)
          print("")
          retval = os.system(cmd)
          assert retval == 0
  
          os.chdir(cwd)
  
file_path: ml-hypersim/code/python/tools/dataset_generate_images_semantic_segmentation.py
imports: from pylab import *
  import argparse
  import fnmatch
  import inspect
  import os
  import pandas
  import path_utils
  import _system_config
  import _dataset_config
label_desc: Use image node_id 1 for calling a global function with example usage: process_scene(s, args) without return types