def make_dirs(*lpath):
    """Ensure the directories exist.

    lpath: path fragments
    """
    path = os.path.join(*lpath)
    try:
        os.makedirs(os.path.dirname(path))
    except __HOLE__ as e:
        if e.errno != errno.EEXIST:
            raise
    return os.path.abspath(path)
dataset/ETHPy150Open jpscaletti/Voodoo/voodoo/helpers.py/make_dirs