code: def test_prediction_intervals_actually_work():
      np.random.seed(0)
  
      (
          df_boston_train,
          df_boston_test,
      ) = utils.get_boston_regression_dataset()
  
      column_descriptions = {"MEDV": "output", "CHAS": "categorical"}
  
      ml_predictor = Predictor(
          type_of_estimator="regressor",
          column_descriptions=column_descriptions,
      )
  
      ml_predictor.train(
          df_boston_train, predict_intervals=[0.05, 0.95]
      )
  
      df_boston_test = df_boston_test.reset_index(drop=True)
      intervals = ml_predictor.predict_intervals(df_boston_test)
      actuals = df_boston_test.MEDV
  
      count_under = 0
      count_over = 0
      # print(intervals)
      for idx, row in intervals.iterrows():
          actual = actuals.iloc[idx]
  
          if actual < row["interval_0.05"]:
              count_under += 1
          if actual > row["interval_0.95"]:
              count_over += 1
  
      len_intervals = len(intervals)
  
      pct_under = count_under * 1.0 / len_intervals
      pct_over = count_over * 1.0 / len_intervals
      # There's a decent bit of noise since this is such a small dataset
      assert pct_under < 0.15
      assert pct_over < 0.1
  
file_path: auto_ml/tests/core_tests/test_prediction_intervals.py
imports: import os
  import sys
  from auto_ml import Predictor
  import dill
  from nose.tools import assert_equal, assert_not_equal, with_setup
  import numpy
  import pandas
  from sklearn.model_selection import train_test_split
  import utils_testing
label_desc: Use image node_id 2 for calling a global function with example usage: test_prediction_intervals_actually_work() without return types