code: def check_dir(dir_path):
      """
      Create directory to save processed image.
  
      Args:
          dir_path (str): directory path to save images.
  
      """
      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/face_detection/pyramidbox_face_detection/processor.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import time
  import base64
  import cv2
  import numpy
  from PIL import ImageDraw
label_desc: Use image node_id 2 for calling a global function with example usage: check_dir(dir_path) without return types