code: def test_fil_classification(
      n_rows, n_columns, num_rounds, n_classes, tmp_path
  ):
      # settings
      classification = True  # change this to false to use regression
      random_state = np.random.RandomState(43210)
  
      X, y = simulate_data(
          n_rows,
          n_columns,
          n_classes,
          random_state=random_state,
          classification=classification,
      )
      # identify shape and indices
      n_rows, n_columns = X.shape
      train_size = 0.80
  
      X_train, X_validation, y_train, y_validation = train_test_split(
          X, y, train_size=train_size, random_state=0
      )
  
      model_path = os.path.join(tmp_path, "xgb_class.model")
  
      bst = _build_and_save_xgboost(
          model_path,
          X_train,
          y_train,
          num_rounds=num_rounds,
          classification=classification,
          n_classes=n_classes,
      )
  
      dvalidation = xgb.DMatrix(X_validation, label=y_validation)
  
      if n_classes == 2:
          xgb_preds = bst.predict(dvalidation)
          xgb_preds_int = np.around(xgb_preds)
          xgb_proba = np.stack([1 - xgb_preds, xgb_preds], axis=1)
      else:
          xgb_proba = bst.predict(dvalidation)
          xgb_preds_int = xgb_proba.argmax(axis=1)
      xgb_acc = accuracy_score(y_validation, xgb_preds_int)
  
      fm = ForestInference.load(
          model_path, algo="auto", output_class=True, threshold=0.50
      )
      fil_preds = np.asarray(fm.predict(X_validation))
      fil_proba = np.asarray(fm.predict_proba(X_validation))
      fil_acc = accuracy_score(y_validation, fil_preds)
  
      assert fil_acc == pytest.approx(xgb_acc, abs=0.01)
      assert array_equal(fil_preds, xgb_preds_int)
      np.testing.assert_allclose(
          fil_proba, xgb_proba, atol=proba_atol[n_classes > 2]
      )
  
imports: from sklearn.model_selection import train_test_split
  from sklearn.metrics import accuracy_score, mean_squared_error
  from sklearn.ensemble import GradientBoostingClassifier, GradientBoostingRegressor, RandomForestClassifier, RandomForestRegressor, ExtraTreesClassifier, ExtraTreesRegressor
  from sklearn.datasets import make_classification, make_regression
  from cuml.internals.import_utils import has_xgboost
  from cuml.testing.utils import array_equal, unit_param, quality_param, stress_param
  from cuml import ForestInference
  from math import ceil
  import os
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: test_fil_classification(n_rows, n_columns, num_rounds, n_classes, tmp_path) without return types