code: def main(config):
      dataset_base_dir = config.base_dir
      scene_list = os.listdir(dataset_base_dir)
      for scene in scene_list:
          scene_raw = scene
          scene = os.path.join(dataset_base_dir, scene, scene_raw)
          check_aggregation_json = os.path.isfile(
              scene + ".aggregation.json"
          )
          check_gt = os.path.isfile(scene + ".txt")
          check_seg = os.path.isfile(
              scene + "_vh_clean_2.0.010000.segs.json"
          )
          check_ply = os.path.isfile(scene + "_vh_clean_2.ply")
          if (
              check_aggregation_json
              and check_gt
              and check_seg
              and check_ply
          ):
              # print("success scene: {}".format(scene_raw))
              pass
          else:
              print(
                  "error scene: {} | agg: {}, gt: {}, seg: {}, ply: {}".format(
                      scene_raw,
                      check_aggregation_json,
                      check_gt,
                      check_seg,
                      check_ply,
                  )
              )
              print("re-downloading the missing file...")
              if config.version == "v2":
                  base_url = (
                      "http://kaldir.vc.in.tum.de/scannet/v2/scans"
                  )
              elif config.version == "v1":
                  base_url = (
                      "http://kaldir.vc.in.tum.de/scannet/v1/scans"
                  )
              else:
                  print(
                      "error, not supported version: {}".format(
                          config.version
                      )
                  )
                  break
              if not check_aggregation_json:
                  download_link = (
                      base_url
                      + "/"
                      + scene_raw
                      + "/"
                      + scene_raw
                      + ".aggregation.json"
                  )
                  out_filename = scene + ".aggregation.json"
                  download_file(download_link, out_filename)
              if not check_gt:
                  download_link = (
                      base_url
                      + "/"
                      + scene_raw
                      + "/"
                      + scene_raw
                      + ".txt"
                  )
                  out_filename = scene + ".txt"
                  download_file(download_link, out_filename)
              if not check_seg:
                  download_link = (
                      base_url
                      + "/"
                      + scene_raw
                      + "/"
                      + scene_raw
                      + "_vh_clean_2.0.010000.segs.json"
                  )
                  out_filename = (
                      scene + "_vh_clean_2.0.010000.segs.json"
                  )
                  download_file(download_link, out_filename)
              if not check_ply:
                  download_link = (
                      base_url
                      + "/"
                      + scene_raw
                      + "/"
                      + scene_raw
                      + "_vh_clean_2.ply"
                  )
                  out_filename = scene + "_vh_clean_2.ply"
                  download_file(download_link, out_filename)
  
imports: import os
  import glob
  import argparse
  import tempfile
  import urllib
  from urllib.request import urlopen
label_desc: Use image node_id 2 for calling a global function with example usage: main(config) without return types