code: def test_sklearn_benchmarks(ray_start_cluster_2_nodes):
      ESTIMATORS = {
          "CART": DecisionTreeClassifier(),
          "ExtraTrees": ExtraTreesClassifier(n_estimators=10),
          "RandomForest": RandomForestClassifier(),
          "Nystroem-SVM": make_pipeline(
              Nystroem(gamma=0.015, n_components=1000), LinearSVC(C=1)
          ),
          "SampledRBF-SVM": make_pipeline(
              RBFSampler(gamma=0.015, n_components=1000), LinearSVC(C=1)
          ),
          "LogisticRegression-SAG": LogisticRegression(
              solver="sag", tol=1e-1, C=1e4
          ),
          "LogisticRegression-SAGA": LogisticRegression(
              solver="saga", tol=1e-1, C=1e4
          ),
          "MultilayerPerceptron": MLPClassifier(
              hidden_layer_sizes=(32, 32),
              max_iter=100,
              alpha=1e-4,
              solver="sgd",
              learning_rate_init=0.2,
              momentum=0.9,
              verbose=1,
              tol=1e-2,
              random_state=1,
          ),
          "MLP-adam": MLPClassifier(
              hidden_layer_sizes=(32, 32),
              max_iter=100,
              alpha=1e-4,
              solver="adam",
              learning_rate_init=0.001,
              verbose=1,
              tol=1e-2,
              random_state=1,
          ),
      }
      # Load dataset.
      print("Loading dataset...")
      unnormalized_X_train, y_train = pickle.load(
          open(
              os.path.join(
                  os.path.dirname(__file__), "mnist_784_100_samples.pkl"
              ),
              "rb",
          )
      )
      # Normalize features.
      X_train = unnormalized_X_train / 255
  
      register_ray()
      train_time = {}
      random_seed = 0
      # Use two workers per classifier.
      num_jobs = 2
      with joblib.parallel_backend("ray"):
          for name in sorted(ESTIMATORS.keys()):
              print("Training %s ... " % name, end="")
              estimator = ESTIMATORS[name]
              estimator_params = estimator.get_params()
              estimator.set_params(
                  **{
                      p: random_seed
                      for p in estimator_params
                      if p.endswith("random_state")
                  }
              )
  
              if "n_jobs" in estimator_params:
                  estimator.set_params(n_jobs=num_jobs)
              time_start = time.time()
              estimator.fit(X_train, y_train)
              train_time[name] = time.time() - time_start
              print(
                  "training", name, "took", train_time[name], "seconds"
              )
  
imports: import joblib
  import sys
  import time
  import os
  import pytest
  from unittest import mock
  import pickle
  import numpy
  from sklearn.datasets import load_digits, load_iris
  from sklearn.model_selection import RandomizedSearchCV
  from sklearn.ensemble import ExtraTreesClassifier
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.kernel_approximation import Nystroem
  from sklearn.kernel_approximation import RBFSampler
  from sklearn.pipeline import make_pipeline
  from sklearn.svm import LinearSVC, SVC
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.linear_model import LogisticRegression
  from sklearn.neural_network import MLPClassifier
  from sklearn.model_selection import cross_val_score
  from ray.util.joblib import register_ray
  import ray
label_desc: Use image node_id 5 for calling a global function with example usage: test_sklearn_benchmarks(ray_start_cluster_2_nodes) without return types