code: def test_n_grid_points(monkeypatch, space):
      """Test that number of points on grid is correct, including adjustment for categorical dims"""
      mock_train_regressor(monkeypatch)
  
      n_grid_points = 5
      partial_dependencies = partial_dependency(
          data,
          space,
          params=["x", "z"],
          n_grid_points=n_grid_points,
          n_samples=10,
      )
  
      assert set(partial_dependencies.keys()) == {"x", ("x", "z"), "z"}
      assert partial_dependencies["z"][1].shape == (3,)
      assert partial_dependencies["z"][2].shape == (3,)
  
      assert len(partial_dependencies["x"][0]["x"]) == n_grid_points
      assert (
          len(partial_dependencies[("x", "z")][0]["x"]) == n_grid_points
      )
      assert partial_dependencies[("x", "z")][0]["z"] == ["a", "b", "c"]
      assert partial_dependencies["z"][0]["z"] == ["a", "b", "c"]
      assert partial_dependencies["x"][1].shape == (n_grid_points,)
      assert partial_dependencies["x"][2].shape == (n_grid_points,)
      assert partial_dependencies["z"][1].shape == (3,)
      assert partial_dependencies["z"][2].shape == (3,)
      assert partial_dependencies[("x", "z")][1].shape == (
          3,
          n_grid_points,
      )
      assert partial_dependencies[("x", "z")][2].shape == (
          3,
          n_grid_points,
      )
  
imports: import copy
  import numpy
  import pandas
  import pytest
  from orion.analysis.partial_dependency_utils import make_grid, partial_dependency, partial_dependency_grid, reverse
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.utils import format_trials
  from orion.core.worker.transformer import build_required_space
label_desc: Use image node_id 16 for calling a global function with example usage: test_n_grid_points(monkeypatch, space) without return types