code: def main(tmpdir: str):
      # Define classification models, and hyperparams.
  
      decision_tree_classifier = SKLearnWrapper(
          DecisionTreeClassifier(),
          HyperparameterSpace(
              {
                  "criterion": Choice(["gini", "entropy"]),
                  "splitter": Choice(["best", "random"]),
                  "min_samples_leaf": RandInt(2, 5),
                  "min_samples_split": RandInt(2, 4),
              }
          ),
      )
  
      extra_tree_classifier = SKLearnWrapper(
          ExtraTreeClassifier(),
          HyperparameterSpace(
              {
                  "criterion": Choice(["gini", "entropy"]),
                  "splitter": Choice(["best", "random"]),
                  "min_samples_leaf": RandInt(2, 5),
                  "min_samples_split": RandInt(2, 4),
              }
          ),
      )
  
      ridge_classifier = Pipeline(
          [
              OutputTransformerWrapper(NumpyRavel()),
              SKLearnWrapper(
                  RidgeClassifier(),
                  HyperparameterSpace(
                      {
                          "alpha": Choice([0.0, 1.0, 10.0, 100.0]),
                          "fit_intercept": Boolean(),
                          "normalize": Boolean(),
                      }
                  ),
              ),
          ]
      ).set_name("RidgeClassifier")
  
      logistic_regression = Pipeline(
          [
              OutputTransformerWrapper(NumpyRavel()),
              SKLearnWrapper(
                  LogisticRegression(),
                  HyperparameterSpace(
                      {
                          "C": LogUniform(0.01, 10.0),
                          "fit_intercept": Boolean(),
                          "penalty": Choice(["none", "l2"]),
                          "max_iter": RandInt(20, 200),
                      }
                  ),
              ),
          ]
      ).set_name("LogisticRegression")
  
      random_forest_classifier = Pipeline(
          [
              OutputTransformerWrapper(NumpyRavel()),
              SKLearnWrapper(
                  RandomForestClassifier(),
                  HyperparameterSpace(
                      {
                          "n_estimators": RandInt(50, 600),
                          "criterion": Choice(["gini", "entropy"]),
                          "min_samples_leaf": RandInt(2, 5),
                          "min_samples_split": RandInt(2, 4),
                          "bootstrap": Boolean(),
                      }
                  ),
              ),
          ]
      ).set_name("RandomForestClassifier")
  
      # Define a classification pipeline that lets the AutoML loop choose one of the classifier.
      # See also ChooseOneStepOf documentation: https://www.neuraxle.org/stable/api/steps/neuraxle.steps.flow.html#neuraxle.steps.flow.ChooseOneStepOf
  
      pipeline = Pipeline(
          [
              ChooseOneStepOf(
                  [
                      decision_tree_classifier,
                      extra_tree_classifier,
                      ridge_classifier,
                      logistic_regression,
                      random_forest_classifier,
                  ]
              )
          ]
      )
  
      # Create the AutoML loop object.
      # See also AutoML documentation: https://www.neuraxle.org/stable/api/metaopt/neuraxle.metaopt.auto_ml.html#neuraxle.metaopt.auto_ml.AutoML
  
      auto_ml = AutoML(
          pipeline=pipeline,
          hyperparams_optimizer=RandomSearchSampler(),
          validation_splitter=ValidationSplitter(
              validation_size=0.20
          ).set_to_force_expected_outputs_for_scoring(),
          scoring_callback=ScoringCallback(
              accuracy_score, higher_score_is_better=True
          ),
          n_trials=7,
          epochs=1,
          hyperparams_repository=HyperparamsOnDiskRepository(
              cache_folder=tmpdir
          ),
          refit_best_trial=True,
          continue_loop_on_error=False,
      )
  
      # Load data, and launch AutoML loop !
  
      X_train, y_train, X_test, y_test = generate_classification_data()
      auto_ml = auto_ml.fit(X_train, y_train)
  
      # Get the model from the best trial, and make predictions using predict, as per the `refit_best_trial=True` argument to AutoML.
      y_pred = auto_ml.predict(X_test)
  
      accuracy = accuracy_score(y_true=y_test, y_pred=y_pred)
      print("Test accuracy score:", accuracy)
  
      shutil.rmtree(tmpdir)
  
imports: import shutil
  from neuraxle.base import ExecutionContext
  from neuraxle.hyperparams.distributions import Boolean, Choice, LogUniform, RandInt
  from neuraxle.hyperparams.space import HyperparameterSpace
  from neuraxle.metaopt.auto_ml import AutoML, RandomSearchSampler, ValidationSplitter
  from neuraxle.metaopt.callbacks import ScoringCallback
  from neuraxle.metaopt.repositories.json import HyperparamsOnDiskRepository
  from neuraxle.pipeline import Pipeline
  from neuraxle.steps.flow import ChooseOneStepOf
  from neuraxle.steps.numpy import NumpyRavel
  from neuraxle.steps.output_handlers import OutputTransformerWrapper
  from neuraxle.steps.sklearn import SKLearnWrapper
  from sklearn.datasets import make_classification
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.linear_model import LogisticRegression, RidgeClassifier
  from sklearn.metrics import accuracy_score
  from sklearn.model_selection import train_test_split
  from sklearn.tree import DecisionTreeClassifier, ExtraTreeClassifier
label_desc: Use image node_id 1 for calling a global function with example usage: main(tmpdir) without return types