code: def test_compute_variance():
      """Test variance computation over the grid"""
      grid = numpy.arange(3 * 5 * 4).reshape(3, 5, 4)
  
      grid[0, :, -1] = 10
      grid[1, :, -1] = [0, 1, 2, 3, 4]
      grid[2, :, -1] = [0, 10, 20, 30, 40]
  
      variances = compute_variances(grid)
      assert variances.shape == (3,)
      assert variances[0] == 0
      assert variances[1] == numpy.var([0, 1, 2, 3, 4])
      assert variances[2] == numpy.var([0, 10, 20, 30, 40])
  
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 5 for calling a global function with example usage: test_compute_variance() without return types