class_docstr: Grid Search algorithm
  
  Parameters
  ----------
  n_values: int or dict
      Number of trials for each dimensions, or dictionary specifying number of trials for each
      dimension independently (name, n_values). For categorical dimensions, n_values will not be
      used, and all categories will be used to build the grid.
code: def __init__(
      self,
      space: Space,
      n_values: int | dict[str, int] = 100,
  ):
      super().__init__(space)
  
      # pylint: disable=invalid-name
      self.n = 0
      self.n_values = n_values
      n_values_dict = (
          {name: n_values for name in self.space.keys()}
          if not isinstance(n_values, dict)
          else n_values
      )
      max_trials = (
          10_000 if self.max_trials is None else self.max_trials
      )
      self.grid = self.build_grid(
          self.space,
          n_values_dict,
          max_trials=max_trials,
      )
      self.index = 0
  
imports: from __future__ import annotations
  import itertools
  import logging
  import numpy
  from orion.algo.base import BaseAlgorithm
  from orion.algo.space import Categorical, Dimension, Fidelity, Integer, Real, Space
  from orion.core.utils import format_trials
label_desc: Use image node_id 1 to create a new GridSearch object from inherited base classes: BaseAlgorithm with example: obj = GridSearch(space, n_values)