docstr: Multiplies grads by a constant ``c``.
code: def multiply_grads(self, c):
      """
      Multiplies grads by a constant ``c``.
      """
      if self._needs_sync:
          self._sync_fp16_grads_to_fp32(c)
      else:
          for p32 in self.fp32_params:
              p32.grad.data.mul_(c)
  
imports: import math
  from itertools import chain
  from typing import Optional
  import parlai.utils.logging
label_desc: Use image node_id 8 for calling the SafeFP16Optimizer obj's underlying member method code with example usage: obj.multiply_grads(c) without return types