code: def _generate_models():
      mix_model = SimpleModel()
      mix_model.fc1.training = True
      mix_model.fc2.training = False
      mix_model.fc1.weight.requires_grad = False
      mix_model.fc2.bias.requires_grad = False
  
      trainon_model = SimpleModel()
      trainon_model.train()
  
      trainoff_model = SimpleModel()
      trainoff_model.eval()
  
      gradon_model = SimpleModel()
  
      gradoff_model = SimpleModel()
      set_param_grad_off(gradoff_model)
  
      return (
          mix_model,
          gradon_model,
          gradoff_model,
          trainon_model,
          trainoff_model,
      )
  
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 1 for calling a global function with example usage: _generate_models() and returns: mix_model,  gradon_model,  gradoff_model,  trainon_model,  trainoff_model