code: def test_rf_classification_seed(small_clf, datatype):
      X, y = small_clf
      X = X.astype(datatype)
      y = y.astype(np.int32)
      X_train, X_test, y_train, y_test = train_test_split(
          X, y, train_size=0.8, random_state=0
      )
  
      for i in range(8):
          seed = random.randint(100, 1e5)
          # Initialize, fit and predict using cuML's
          # random forest classification model
          cu_class = curfc(random_state=seed, n_streams=1)
          cu_class.fit(X_train, y_train)
  
          # predict using FIL
          fil_preds_orig = cu_class.predict(X_test, predict_model="GPU")
          cu_preds_orig = cu_class.predict(X_test, predict_model="CPU")
          cu_acc_orig = accuracy_score(y_test, cu_preds_orig)
          fil_preds_orig = np.reshape(
              fil_preds_orig, np.shape(cu_preds_orig)
          )
  
          fil_acc_orig = accuracy_score(y_test, fil_preds_orig)
  
          # Initialize, fit and predict using cuML's
          # random forest classification model
          cu_class2 = curfc(random_state=seed, n_streams=1)
          cu_class2.fit(X_train, y_train)
  
          # predict using FIL
          fil_preds_rerun = cu_class2.predict(
              X_test, predict_model="GPU"
          )
          cu_preds_rerun = cu_class2.predict(
              X_test, predict_model="CPU"
          )
          cu_acc_rerun = accuracy_score(y_test, cu_preds_rerun)
          fil_preds_rerun = np.reshape(
              fil_preds_rerun, np.shape(cu_preds_rerun)
          )
  
          fil_acc_rerun = accuracy_score(y_test, fil_preds_rerun)
  
          assert fil_acc_orig == fil_acc_rerun
          assert cu_acc_orig == cu_acc_rerun
          assert (fil_preds_orig == fil_preds_rerun).all()
          assert (cu_preds_orig == cu_preds_rerun).all()
  
imports: import treelite
  from sklearn.model_selection import train_test_split
  from sklearn.datasets import fetch_california_housing, make_classification, make_regression, load_iris, load_breast_cancer
  from sklearn.metrics import accuracy_score, mean_squared_error, mean_tweedie_deviance
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.ensemble import RandomForestClassifier
  import cuml.internals.logger
  from cuml.testing.utils import get_handle, unit_param, quality_param, stress_param
  from cuml.metrics import r2_score
  from cuml.ensemble import RandomForestRegressor
  from cuml.ensemble import RandomForestClassifier
  import cuml
  from cuml.internals.safe_imports import gpu_only_import_from
  import os
  import json
  import random
  from cuml.internals.safe_imports import cpu_only_import
  import pytest
  import warnings
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 10 for calling a global function with example usage: test_rf_classification_seed(small_clf, datatype) without return types