code: def test_run_artificial_function() -> None:
      func = ArtificialFunction(name="sphere", block_dimension=2)
      xp = xpbase.Experiment(
          func,
          optimizer="OnePlusOne",
          budget=24,
          num_workers=2,
          batch_mode=True,
          seed=12,
      )
      summary = xp.run()
      assert summary["elapsed_time"] < 0.5  # should be much faster
      np.testing.assert_almost_equal(
          summary["loss"], 0.08444784112287358
      )  # makes sure seeding works!
      testing.assert_set_equal(summary.keys(), DESCRIPTION_KEYS)
      np.testing.assert_equal(summary["elapsed_budget"], 24)
      np.testing.assert_equal(summary["pseudotime"], 12)
  
imports: import sys
  import contextlib
  from unittest.mock import patch
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import testing
  from nevergrad.optimization import test_base
  from nevergrad.functions import ArtificialFunction
  from nevergrad.functions.base import MultiExperiment
  from nevergrad.functions.test_base import ExampleFunction
  from nevergrad.functions.test_functionlib import DESCRIPTION_KEYS
  from .None import xpbase
label_desc: Use image node_id 1 for calling a global function with example usage: test_run_artificial_function() without return types