class_docstr: Online Newton Step (ONS) optimizer.
  
  This optimizer uses second-order information (i.e. the Hessian of the cost function) in
  addition to first-order information (i.e. the gradient of the cost function).
  
  Parameters
  ----------
  lr
  eps
  
  References
  ----------
  [^1]: [Hazan, E., Agarwal, A. and Kale, S., 2007. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2-3), pp.169-192](https://www.cs.princeton.edu/~ehazan/papers/log-journal.pdf)
code: def _step_with_dict(self, w, g):
      for i in g:
          if (i, i) not in self.H_inv:
              self.H_inv[i, i] = self.eps
  
      # Update the Hessian
      self.H = sherman_morrison(A_inv=self.H_inv, u=g, v=g)
  
      # Calculate the update step
      step = utils.math.dotvecmat(x=g, A=self.H_inv)
  
      # Update the weights
      for i, s in step.items():
          w[i] -= self.learning_rate * s
  
      return w
  
imports: from __future__ import annotations
  from river import optim, utils
label_desc: Use image node_id 2 for calling the Newton obj's underlying member method code with example usage: obj._step_with_dict(w, g) and returns: w