code: def test_lpi_n_runs(monkeypatch):
      """Verify number of runs"""
      N_RUNS = 5
  
      seeds = set()
      n_runs = 0
  
      def mock_train_regressor(*args, **kwargs):
          nonlocal n_runs
          n_runs += 1
          seeds.add(kwargs["random_state"])
          return train_regressor(*args, **kwargs)
  
      monkeypatch.setattr(
          "orion.analysis.lpi_utils.train_regressor",
          mock_train_regressor,
      )
      lpi(data, space, random_state=1, n_runs=N_RUNS)
  
      assert n_runs == N_RUNS
      assert len(seeds) > 0
  
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 10 for calling a global function with example usage: test_lpi_n_runs(monkeypatch) and returns: train_regressor