code: def check_dir(dir_path):
      # 目录检查函数
      if not os.path.exists(dir_path):
          os.makedirs(dir_path)
      elif os.path.isfile(dir_path):
          os.remove(dir_path)
          os.makedirs(dir_path)
  
file_path: PaddleHub/modules/image/Image_gan/style_transfer/UGATIT_100w/processor.py
imports: import os
  import cv2
  import time
  import base64
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: check_dir(dir_path) without return types