class_docstr: Factorization Machines base class.
code: def learn_one(self, x, y, w=1.0):
      x = self._ohe_cat_features(x)
  
      if self.sample_normalization:
          x_l2_norm = sum(xj**2 for xj in x.values()) ** 0.5
          x = {j: xj / x_l2_norm for j, xj in x.items()}
  
      self._learn_one(x, y, w=w)
  
imports: from __future__ import annotations
  import abc
  import collections
  import numbers
  from collections.abc import Iterable
  import numpy
  from river import optim, utils
label_desc: Use image node_id 3 for calling the BaseFM obj's underlying member method code with example usage: obj.learn_one(x, y, w) without return types