code: def mkdir(path):
      sub_dir = os.path.dirname(path)
      if not os.path.exists(sub_dir):
          os.makedirs(sub_dir)
  
file_path: PaddleSeg/Matting/ppmatting/utils/utils.py
imports: import os
  import paddle
  from urllib.parse import urlparse
  from paddleseg.utils import logger, download_pretrained_model
label_desc: Use image node_id 3 for calling a global function with example usage: mkdir(path) without return types