code: def test_lpi_with_multidim_data():
      """Verify LPI can be computed on categorical dimensions"""
      data = pd.DataFrame(
          data={
              "id": ["a", "b", "c", "d"],
              "x": [[0, 2, 4], [1, 1, 3], [2, 2, 2], [3, 0, 3]],
              "y": [["b", "b"], ["c", "b"], ["a", "a"], ["d", "c"]],
              "objective": [0.1, 0.2, 0.3, 0.5],
          }
      )
  
      space = SpaceBuilder().build(
          {
              "x": "uniform(0, 6, shape=3)",
              "y": 'choices(["a", "b", "c", "d"], shape=2)',
          }
      )
  
      results = lpi(data, space, random_state=1)
      assert results.columns.tolist() == ["LPI", "STD"]
      assert results.index.tolist() == [
          "x[0]",
          "x[1]",
          "x[2]",
          "y[0]",
          "y[1]",
      ]
      # The data is made such some x correlates more strongly with objective than other x and most y
      assert results["LPI"].loc["x[0]"] > results["LPI"].loc["x[1]"]
      assert results["LPI"].loc["x[1]"] > results["LPI"].loc["x[2]"]
      assert results["LPI"].loc["x[0]"] > results["LPI"].loc["y[0]"]
      assert results["LPI"].loc["x[0]"] > results["LPI"].loc["y[1]"]
  
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 8 for calling a global function with example usage: test_lpi_with_multidim_data() without return types