def ensure_dirs_exist(path):
    outdir = os.path.dirname(path)
    if outdir != '' and not os.path.isdir(outdir):
        os.makedirs(outdir)
    return path
Disables the optimization for the PyCastObject instance.
dataset/ETHPy150Open NervanaSystems/neon/neon/util/persist.py/ensure_dirs_exist--crossover with--dataset/ETHPy150Open T-002/pycast/pycast/common/pycastobject.py/PyCastObject._disable_instance_optimization