class_docstr: Implementation of `Lookahead Optimizer: k steps forward, 1 step back <https://arxiv.org/abs/1907.08610>`_
  
  Args:
      :param optimizer:       - the optimizer to work with (sgd, adam etc)
      :param k: (int)         - number of steps to look ahead (default=5)
      :param alpha: (float)   - slow weights step size
code: def update(self, group):
      for fast in group["params"]:
          param_state = self.state[fast]
          if "slow_param" not in param_state:
              param_state["slow_param"] = torch.zeros_like(fast.data)
              param_state["slow_param"].copy_(fast.data)
          slow = param_state["slow_param"]
          slow += (fast.data - slow) * self.alpha
          fast.data.copy_(slow)
  
file_path: pywick/pywick/optimizers/lookahead.py
imports: from collections import defaultdict
  from torch.optim.optimizer import Optimizer
  import torch
label_desc: Use image node_id 2 for calling the Lookahead obj's underlying member method code with example usage: obj.update(group) without return types