code: def test_make_grid_predictor(monkeypatch):
      """Test grid contains corresponding predictions from the model"""
      trials = to_numpy(data, space)
      model = train_regressor("RandomForestRegressor", trials)
      best_point = trials[numpy.argmin(trials[:, -1])]
  
      # Make sure model is not predicting exactly the original objective
      with numpy.testing.assert_raises(AssertionError):
          numpy.testing.assert_equal(
              best_point[-1],
              model.predict(best_point[:-1].reshape(1, -1)),
          )
  
      grid = make_grid(best_point, space, model, 4)
  
      # Verify that grid predictions are those of the model
      numpy.testing.assert_equal(
          grid[0][:, -1], model.predict(grid[0][:, :-1])
      )
      numpy.testing.assert_equal(
          grid[1][:, -1], model.predict(grid[1][:, :-1])
      )
  
      # Verify model predictions differ on different points
      with numpy.testing.assert_raises(AssertionError):
          numpy.testing.assert_equal(grid[0][:, -1], grid[1][:, -1])
  
file_path: orion/tests/unittests/analysis/test_lpi.py
imports: import copy
  import numpy
  import pandas
  from orion.analysis.base import to_numpy, train_regressor
  from orion.analysis.lpi_utils import compute_variances, lpi, make_grid
  from orion.core.io.space_builder import SpaceBuilder
label_desc: Use image node_id 4 for calling a global function with example usage: test_make_grid_predictor(monkeypatch) without return types