class_docstr: Wrap `opt` in a lookahead optimizer
class_docstr_tok: ["Wrap","`","opt","`","in","a","lookahead","optimizer"]
code: def __init__(
      self,
      opt: Optimizer,  # `Optimizer` to wrap with Lookahead
      k: int = 6,  # How often to conduct Lookahead step
      alpha: float = 0.5,  # Slow weight moving average coefficient
  ):
      store_attr("opt,k,alpha")
      self._init_state()
  
imports: from __future__ import annotations
  from .torch_basics import *
label_desc: Use image node_id 1 to create a new Lookahead object from inherited base classes: Optimizer, GetAttr with example: obj = Lookahead(opt, k, alpha)