code: def _create_if_not_exist(path):
      basedir = os.path.dirname(path)
      if not os.path.exists(basedir):
          os.makedirs(basedir)
  
file_path: PGL/examples/kddcup2021/MAG240M/r_unimp/utils.py
imports: import os
  import paddle
  import paddle.distributed
  import glob
  import shutil
  from pgl.utils.logger import log
label_desc: Use image node_id 1 for calling a global function with example usage: _create_if_not_exist(path) without return types