code: def __init__(self, C, mode, learn_intercept):
      self.C = C
      self.mode = mode
      self.calc_tau = {
          0: self._calc_tau_0,
          1: self._calc_tau_1,
          2: self._calc_tau_2,
      }[mode]
      self.learn_intercept = learn_intercept
      self.weights = collections.defaultdict(float)
      self.intercept = 0.0
  
imports: from __future__ import annotations
  import collections
  import numpy
  from river import base, optim, utils
label_desc: Use image node_id 1 to create a new BasePA object  with example: obj = BasePA(C, mode, learn_intercept)