code: def main():
      splits = {
          "train": [
              "area1",
              "area11",
              "area13",
              "area15",
              "area17",
              "area21",
              "area23",
              "area26",
              "area28",
              "area3",
              "area30",
              "area32",
              "area34",
              "area37",
              "area5",
              "area7",
          ],
          "val": [
              "area6",
              "area24",
              "area35",
              "area16",
              "area14",
              "area22",
              "area10",
              "area4",
              "area2",
              "area20",
              "area8",
              "area31",
              "area33",
              "area27",
              "area38",
              "area12",
              "area29",
          ],
      }
  
      dataset_path = args.dataset_path
      if args.out_dir is None:
          out_dir = osp.join("data", "vaihingen")
      else:
          out_dir = args.out_dir
  
      print("Making directories...")
      if not osp.exists(osp.join(out_dir, "img_dir", "train")):
          os.makedirs(osp.join(out_dir, "img_dir", "train"))
      if not osp.exists(osp.join(out_dir, "img_dir", "val")):
          os.makedirs(osp.join(out_dir, "img_dir", "val"))
      if not osp.exists(osp.join(out_dir, "ann_dir", "train")):
          os.makedirs(osp.join(out_dir, "ann_dir", "train"))
      if not osp.exists(osp.join(out_dir, "ann_dir", "val")):
          os.makedirs(osp.join(out_dir, "ann_dir", "val"))
  
      zipp_list = glob.glob(os.path.join(dataset_path, "*.zip"))
      print("Find the data", zipp_list)
  
      with tempfile.TemporaryDirectory(dir=args.tmp_dir) as tmp_dir:
          for zipp in zipp_list:
              zip_file = zipfile.ZipFile(zipp)
              zip_file.extractall(tmp_dir)
              src_path_list = glob.glob(os.path.join(tmp_dir, "*.tif"))
              if "ISPRS_semantic_labeling_Vaihingen" in zipp:
                  src_path_list = glob.glob(
                      os.path.join(
                          os.path.join(tmp_dir, "top"), "*.tif"
                      )
                  )
              if (
                  "ISPRS_semantic_labeling_Vaihingen_ground_truth_eroded_COMPLETE"
                  in zipp
              ):  # noqa
                  src_path_list = glob.glob(
                      os.path.join(tmp_dir, "*.tif")
                  )
                  # delete unused area9 ground truth
                  for area_ann in src_path_list:
                      if "area9" in area_ann:
                          src_path_list.remove(area_ann)
              for i, src_path in enumerate(src_path_list):
                  area_idx = (
                      osp.basename(src_path).split("_")[3].strip(".tif")
                  )
                  data_type = (
                      "train" if area_idx in splits["train"] else "val"
                  )
                  if "noBoundary" in src_path:
                      dst_dir = osp.join(out_dir, "ann_dir", data_type)
                      clip_big_image(src_path, dst_dir, to_label=True)
                  else:
                      dst_dir = osp.join(out_dir, "img_dir", data_type)
                      clip_big_image(src_path, dst_dir, to_label=False)
  
          print("Removing the temporary files...")
  
      print("Done!")
  
file_path: PaddleSeg/contrib/RSSegBenchmark/data/prepare_vaihingen.py
imports: import argparse
  import glob
  import math
  import os
  import os.path
  import tempfile
  import zipfile
  import cv2
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types