def ensure_dirs(filename):
    dirname, _ = os.path.split(filename)
    if dirname and not os.path.exists(dirname):
        os.makedirs(dirname)
Returns context variables useful to Local Sites.
dataset/ETHPy150Open ionelmc/python-hunter/ci/appveyor-download.py/ensure_dirs--crossover with--dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/site/context_processors.py/localsite