code: def test_build_grid():
      """Test that grid search builds the proper grid"""
      dim1 = Real("dim1", "uniform", 0, 1)
      dim2 = Integer("dim2", "uniform", 0, 10)
      dim3 = Categorical("dim3", "abcde")
      space = Space()
      space.register(dim1)
      space.register(dim2)
      space.register(dim3)
  
      grid = GridSearch.build_grid(
          space, {"dim1": 3, "dim2": 4, "dim3": 1}
      )
      assert len(grid) == 3 * 4 * 5
  
imports: from __future__ import annotations
  import logging
  import numpy.testing
  import pytest
  from orion.algo.gridsearch import GridSearch, categorical_grid, discrete_grid, grid, real_grid
  from orion.algo.space import Categorical, Integer, Real, Space
  from orion.testing.algo import BaseAlgoTests
label_desc: Use image node_id 12 for calling a global function with example usage: test_build_grid() without return types