code: def _assert_training_off(module):
      for mod in module.modules():
          assert not mod.training
  
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 4 for calling a global function with example usage: _assert_training_off(module) without return types