def METHOD_NAME(self, group):
    min_trust = group["min_trust"]
    weight_decay = group["weight_decay"]
    step_size = group["lr"]
    alpha = group["look_ahead_alpha"]
    k = group["look_ahead_k"]
    use_look_ahead = group["use_look_ahead"]
    for p in group["params"]:
        if p.grad is None:
            continue
        grad = p.grad.data
        if grad.is_sparse:
            raise RuntimeError("Lamb does not support sparse gradients, consider SparseAdam instead.")
        adam_step = self._compute_adam_step(group, p, weight_decay, use_look_ahead)
        if min_trust != 1.0:
            weight_norm = torch.norm(p.data.detach()).item()
            step_norm = torch.norm(adam_step.detach()).item()
            if weight_norm == 0 or step_norm == 0 or min_trust == 1.0:
                trust_ratio = 1
            else:
                trust_ratio = min(weight_norm, 10.0) / step_norm
                trust_ratio = min(max(trust_ratio, min_trust), 1.0 / min_trust)
        else:
            trust_ratio = 1.0
        state = self.state[p]
        p.data.add_(adam_step, alpha=-step_size * trust_ratio)
        if use_look_ahead and (state["step"] % k) == 0:
            state["slow_param"].mul_(1 - alpha).add_(p.data, alpha=alpha)
            p.data.copy_(state["slow_param"])
        state["step"] += 1