def ensure_dirs(filename):
    dirname, _ = os.path.split(filename)
    if dirname and not os.path.exists(dirname):
        os.makedirs(dirname)
Make sure the directories exist for `filename`.
dataset/ETHPy150Open ionelmc/python-hunter/ci/appveyor-download.py/ensure_dirs