def mk_tmp_dir(tmp_dir):
    if tmp_dir is None:
        tmp_dir = os.getcwd() + '/tmp_dir'
    try:
        os.makedirs(tmp_dir)
    except __HOLE__ as exc:  # Python >2.5
        if exc.errno == errno.EEXIST and os.path.isdir(tmp_dir):
            pass
        else:
            raise

    return tmp_dir
dataset/ETHPy150Open qe-team/marmot/marmot/experiment/import_utils.py/mk_tmp_dir