code: def test_mocked_steady_executor_time() -> None:
      func = Function()
      executor = execution.MockedTimedExecutor(batch_mode=False)
      jobs = [executor.submit(func, 0, 0)]
      np.testing.assert_equal(jobs[0].done(), True)
      jobs.append(executor.submit(func, 2, 0))
      np.testing.assert_equal(
          jobs[0].done(), False
      )  # now there is one job before
      np.testing.assert_equal(jobs[1].done(), True)
      np.testing.assert_equal(executor._time, 0)
      jobs[1].result()
      np.testing.assert_equal(executor._time, 3)
      # now making sure that jobs start from new time
      jobs.append(executor.submit(func, 4, 0))
      jobs.append(executor.submit(func, 3, 0))
      np.testing.assert_equal(sum(j.done() for j in jobs), 2)
      np.testing.assert_array_equal(
          [j.release_time for j in executor._steady_priority_queue],
          [4, 5, 5],
      )
      new_finished: tp.Optional[
          tp.List[execution.MockedTimedJob]
      ] = None
      order: tp.List[int] = []
      # pylint: disable=unsubscriptable-object
      while new_finished is None or new_finished:
          if new_finished is not None:
              assert (
                  len(new_finished) == 1
              ), f"Weird list: {new_finished}"
              order.append(jobs.index(new_finished[0]))
              new_finished[0].result()
          new_finished = [
              j for j in jobs if j.done() and not j._is_read
          ]
      np.testing.assert_array_equal(order, [2, 0, 3])
  
file_path: nevergrad/nevergrad/benchmark/test_execution.py
imports: import numbers
  from operator import add
  import numpy
  import nevergrad
  import nevergrad.common.typing
  from nevergrad.common import testing
  from nevergrad.functions import ArtificialFunction
  from nevergrad.functions import ExperimentFunction
  from .None import execution
label_desc: Use image node_id 2 for calling a global function with example usage: test_mocked_steady_executor_time() without return types