code: def _run_one_assert_val(ctxmgr, model, assert_inside, assert_outside):
      output = model(vecdata)
      assert_outside(model)
      with ctxmgr(model):
          assert_inside(model)
          assert torch_allclose(output, model(vecdata))
      assert_outside(model)
      assert torch_allclose(output, model(vecdata))
  
file_path: advertorch/tests/test_context.py
imports: import pytest
  from advertorch.context import ctx_eval
  from advertorch.context import ctx_noparamgrad
  from advertorch.context import ctx_noparamgrad_and_eval
  from advertorch.context import get_param_grad_state
  from advertorch.context import get_module_training_state
  from advertorch.context import set_param_grad_off
  from advertorch.utils import torch_allclose
  from advertorch.test_utils import SimpleModel
  from advertorch.test_utils import vecdata
label_desc: Use image node_id 6 for calling a global function with example usage: _run_one_assert_val(ctxmgr, model, assert_inside, assert_outside) without return types