code: def run_model_step(model, gradient_list):
      for value in gradient_list:
          for p in model.parameters():
              p.grad = torch.empty_like(p, dtype=p.dtype)
              p.grad.fill_(value)
          model.step()
  
file_path: DeepSpeed/tests/unit/runtime/half_precision/test_dynamic_loss_scale.py
imports: import torch
  import deepspeed
  import numpy
  from unit.common import DistributedTest
  from unit.simple_model import SimpleModel
label_desc: Use image node_id 1 for calling a global function with example usage: run_model_step(model, gradient_list) without return types