code: def set_module_training_state(module, training_state):
      for mod in module.modules():
          mod.training = training_state[mod]
  
file_path: advertorch/advertorch/context.py
imports: from contextlib import contextmanager
label_desc: Use image node_id 3 for calling a global function with example usage: set_module_training_state(module, training_state) without return types