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/object_detection/faster_rcnn_resnet50_fpn_coco2017/processor.py
imports: import base64
  import os
  import cv2
  import numpy
  from PIL import Image, ImageDraw
label_desc: Use image node_id 2 for calling a global function with example usage: check_dir(dir_path) without return types