class_docstr: Nesterov Momentum optimizer.
  
  Parameters
  ----------
  lr
  rho
  
  Examples
  --------
  
  >>> from river import datasets
  >>> from river import evaluate
  >>> from river import linear_model
  >>> from river import metrics
  >>> from river import optim
  >>> from river import preprocessing
  
  >>> dataset = datasets.Phishing()
  >>> optimizer = optim.NesterovMomentum()
  >>> model = (
  ...     preprocessing.StandardScaler() |
  ...     linear_model.LogisticRegression(optimizer)
  ... )
  >>> metric = metrics.F1()
  
  >>> evaluate.progressive_val_score(dataset, model, metric)
  F1: 84.22%
code: def _step_with_dict(self, w, g):
      # Move w back to it's initial position
      for i in w:
          w[i] += self.rho * self.s[i]
  
      for i, gi in g.items():
          self.s[i] = self.rho * self.s[i] + self.learning_rate * gi
          w[i] -= self.s[i]
  
      return w
  
file_path: river/river/optim/nesterov.py
imports: from __future__ import annotations
  import collections
  from river import optim
label_desc: Use image node_id 3 for calling the NesterovMomentum obj's underlying member method code with example usage: obj._step_with_dict(w, g) and returns: w