code: def fit(
      self,
      X: numpy.ndarray,
      y: numpy.ndarray,
      search_spaces: numpy.ndarray,
      column_to_encoded_columns: List[numpy.ndarray],
  ) -> None:
      assert X.shape[0] == y.shape[0]
      assert X.shape[1] == search_spaces.shape[0]
      assert search_spaces.shape[1] == 2
  
      self._forest.fit(X, y)
  
      self._trees = [
          _FanovaTree(e.tree_, search_spaces)
          for e in self._forest.estimators_
      ]
      self._column_to_encoded_columns = column_to_encoded_columns
      self._variances = {}
  
      if all(tree.variance == 0 for tree in self._trees):
          # If all trees have 0 variance, we cannot assess any importances.
          # This could occur if for instance `X.shape[0] == 1`.
          raise RuntimeError(
              "Encountered zero total variance in all trees."
          )
  
file_path: optuna/optuna/importance/_fanova/_fanova.py
imports: from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Tuple
  from typing import Union
  import numpy
  from optuna._imports import try_import
  from optuna.importance._fanova._tree import _FanovaTree
label_desc: Use image node_id 2 for calling the _Fanova obj's underlying member method code with example usage: obj.fit(X, y, search_spaces, column_to_encoded_columns) without return types