code: def optimize_final_model_regression(model_name=None):
      np.random.seed(0)
  
      (
          df_boston_train,
          df_boston_test,
      ) = utils.get_boston_regression_dataset()
  
      # We just want to make sure these run, not necessarily make sure that they're super accurate (which takes more time, and is dataset dependent)
      df_boston_train = df_boston_train.sample(frac=0.5)
  
      column_descriptions = {"MEDV": "output", "CHAS": "categorical"}
  
      ml_predictor = Predictor(
          type_of_estimator="regressor",
          column_descriptions=column_descriptions,
      )
  
      ml_predictor.train(
          df_boston_train,
          optimize_final_model=True,
          model_names=model_name,
      )
  
      test_score = ml_predictor.score(
          df_boston_test, df_boston_test.MEDV
      )
  
      print("test_score")
      print(test_score)
  
      # the random seed gets a score of -3.21 on python 3.5
      # There's a ton of noise here, due to small sample sizes
      lower_bound = -3.4
      if model_name == "DeepLearningRegressor":
          lower_bound = -24
      if model_name == "LGBMRegressor":
          lower_bound = -16
      if model_name == "GradientBoostingRegressor":
          lower_bound = -5.1
      if model_name == "CatBoostRegressor":
          lower_bound = -4.5
      if model_name == "XGBRegressor":
          lower_bound = -4.8
  
      assert lower_bound < test_score < -2.75
  
file_path: auto_ml/tests/advanced_tests/regressors.py
imports: import datetime
  import os
  import random
  import sys
  from auto_ml import Predictor
  from auto_ml.utils_models import load_ml_model
  import dill
  from nose.tools import assert_equal, assert_not_equal, with_setup
  import numpy
  from sklearn.model_selection import train_test_split
  import utils_testing
label_desc: Use image node_id 1 for calling a global function with example usage: optimize_final_model_regression(model_name) without return types