code: def rescale_gradients(self, scale: float):
          
          for exe in self.executors:
              for arr in exe.grad_arrays:
                  if arr is None:
                      continue
                  arr *= scale
docs: Rescales gradient arrays of executors by scale.