@contextmanager
def pushd(new_dir):
    prev_dir = os.getcwd()
    os.chdir(new_dir)
    yield
    os.chdir(prev_dir)
Run gradient optimization to estimate best v for specified problem
dataset/ETHPy150Open nitely/Spirit/spirit/core/utils/__init__.py/pushd--crossover with--dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/allocmodel/admix/OptimizerForHDPFullVarModel.py/estimate_u