code: def _compare_with_sklearn_classifier_iris(
      n_estimators=99,
      class_weight=None,
      sample_weight=None,
      description="",
  ):
      x_train, x_test, y_train, y_test = train_test_split(
          IRIS.data, IRIS.target, test_size=0.33, random_state=31
      )
      # models
      scikit_model = ScikitRandomForestClassifier(
          n_estimators=n_estimators,
          class_weight=class_weight,
          max_depth=None,
          random_state=777,
      )
      daal4py_model = DaalRandomForestClassifier(
          n_estimators=n_estimators,
          class_weight=class_weight,
          max_depth=None,
          random_state=777,
      )
      # training
      scikit_model.fit(x_train, y_train, sample_weight=sample_weight)
      daal4py_model.fit(x_train, y_train, sample_weight=sample_weight)
      # predict
      scikit_predict = scikit_model.predict(x_test)
      daal4py_predict = daal4py_model.predict(x_test)
      # accuracy
      scikit_accuracy = accuracy_score(scikit_predict, y_test)
      daal4py_accuracy = accuracy_score(daal4py_predict, y_test)
      ratio = daal4py_accuracy / scikit_accuracy
      reason = (
          description
          + f"scikit_accuracy={scikit_accuracy}, daal4py_accuracy={daal4py_accuracy}"
      )
      assert ratio >= ACCURACY_RATIO, reason
  
      # predict_proba
      scikit_predict_proba = scikit_model.predict_proba(x_test)
      daal4py_predict_proba = daal4py_model.predict_proba(x_test)
      # log_loss
      scikit_log_loss = log_loss(y_test, scikit_predict_proba)
      daal4py_log_loss = log_loss(y_test, daal4py_predict_proba)
      ratio = daal4py_log_loss / scikit_log_loss
  
      reason = (
          description
          + f"scikit_log_loss={scikit_log_loss}, daal4py_log_loss={daal4py_log_loss}"
      )
      assert ratio <= LOG_LOSS_RATIO, reason
  
      # ROC AUC
      scikit_roc_auc = roc_auc_score(
          y_test, scikit_predict_proba, multi_class="ovr"
      )
      daal4py_roc_auc = roc_auc_score(
          y_test, daal4py_predict_proba, multi_class="ovr"
      )
      ratio = daal4py_roc_auc / scikit_roc_auc
  
      reason = (
          description
          + f"scikit_roc_auc={scikit_roc_auc}, daal4py_roc_auc={daal4py_roc_auc}"
      )
      assert ratio >= ROC_AUC_RATIO, reason
  
file_path: scikit-learn-intelex/daal4py/sklearn/ensemble/tests/test_decision_forest.py
imports: import random
  import numpy
  import pytest
  from sklearn.datasets import load_iris
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.metrics import accuracy_score, log_loss, mean_squared_error, roc_auc_score
  from sklearn.model_selection import train_test_split
  from daal4py.sklearn._utils import daal_check_version
  from daal4py.sklearn.ensemble import RandomForestClassifier
  from daal4py.sklearn.ensemble import RandomForestRegressor
label_desc: Use image node_id 1 for calling a global function with example usage: _compare_with_sklearn_classifier_iris(n_estimators, class_weight, sample_weight, description) without return types