code: def _build_fil_skl_classifier(m, data, args, tmpdir):
      """Trains an SKLearn classifier and returns a FIL version of it"""
  
      train_data, train_label = _training_data_to_numpy(
          data[0], data[1]
      )
  
      params = {
          "n_estimators": 100,
          "max_leaf_nodes": 2**10,
          "max_features": "sqrt",
          "n_jobs": -1,
          "random_state": 42,
      }
      params.update(args)
  
      # remove keyword arguments not understood by SKLearn
      for param_name in [
          "fil_algo",
          "output_class",
          "threshold",
          "storage_type",
          "precision",
      ]:
          params.pop(param_name, None)
  
      max_leaf_nodes = args["max_leaf_nodes"]
      n_estimators = args["n_estimators"]
      n_feature = data[0].shape[1]
      train_size = data[0].shape[0]
      model_name = (
          f"skl_{max_leaf_nodes}_{n_estimators}_{n_feature}_"
          + f"{train_size}.model.pkl"
      )
      model_path = os.path.join(tmpdir, model_name)
      skl_model = skl_ensemble.RandomForestClassifier(**params)
      skl_model.fit(train_data, train_label)
      pickle.dump(skl_model, open(model_path, "wb"))
  
      fil_kwargs = {
          param: args[input_name]
          for param, input_name in (
              ("algo", "fil_algo"),
              ("output_class", "output_class"),
              ("threshold", "threshold"),
              ("storage_type", "storage_type"),
              ("precision", "precision"),
          )
          if input_name in args
      }
  
      return m.load_from_sklearn(skl_model, **fil_kwargs)
  
imports: from cuml.manifold import UMAP
  from cuml.benchmark import datagen
  from cuml.common.device_selection import using_device_type
  from cuml.internals.device_type import DeviceType
  from cuml.internals.global_settings import GlobalSettings
  from cuml.internals.safe_imports import cpu_only_import, gpu_only_import, gpu_only_import_from, safe_import
  import sklearn.ensemble
  import pickle
  import os
  import cuml
  from cuml.internals import input_utils
  from time import perf_counter
label_desc: Use image node_id 13 for calling a global function with example usage: _build_fil_skl_classifier(m, data, args, tmpdir) and returns: m