code: def isCreateOrDeleteFolder(path, flag):
      flagPath = os.path.join(path, flag)
  
      if os.path.exists(flagPath):
          shutil.rmtree(flagPath)
  
      os.makedirs(flagPath)
      flagAbsPath = os.path.abspath(flagPath)
      return flagAbsPath
  
file_path: PaddleOCR/PPOCRLabel/gen_ocr_train_val_test.py
imports: import os
  import shutil
  import random
  import argparse
label_desc: Use image node_id 1 for calling a global function with example usage: isCreateOrDeleteFolder(path, flag) and returns: flagAbsPath