def ensure_exists(path):
    try: 
        os.makedirs(path)
    except __HOLE__ as e:
        if e.errno == errno.EEXIST: # (path exists)
            pass
        if not os.path.isdir(path):
            raise
dataset/ETHPy150Open memex-explorer/memex-explorer/source/apps/crawl_space/utils.py/ensure_exists