class_docstr: Optimizer interface.
  
  Every optimizer inherits from this base interface.
  
  Parameters
  ----------
  lr
  
  Attributes
  ----------
  learning_rate : float
      Returns the current learning rate value.
code: def __init__(self, lr: int | float | Scheduler):
      if isinstance(lr, int) or isinstance(lr, float):
          lr = optim.schedulers.Constant(lr)
      self.lr = lr
      self.n_iterations = 0
  
imports: from __future__ import annotations
  import abc
  import typing
  import numpy
  from river import base, optim, utils
label_desc: Use image node_id 1 to create a new Optimizer object from inherited base classes: base with example: obj = Optimizer(lr)