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/semantic_segmentation/deeplabv3p_xception65_humanseg/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
label_desc: Use image node_id 4 for calling a global function with example usage: check_dir(dir_path) without return types