def METHOD_NAME(self, optimizer: Optimizer) -> None:
    scaler = self.scaler
    if scaler is not None:
        if _optimizer_handles_unscaling(optimizer):
            raise NotImplementedError("Gradient clipping is not implemented for optimizers handling the unscaling.")
        scaler.unscale_(optimizer)