code: def test_sequential_executor() -> None:
      func = CounterFunction()
      executor = utils.SequentialExecutor()
      job1 = executor.submit(func, [3])
      np.testing.assert_equal(job1.done(), True)
      np.testing.assert_equal(job1.result(), 4)
      np.testing.assert_equal(func.count, 1)
      job2 = executor.submit(func, [3])
      np.testing.assert_equal(job2.done(), True)
      np.testing.assert_equal(func.count, 1)  # not computed just yet
      job2.result()
      np.testing.assert_equal(func.count, 2)
  
file_path: nevergrad/nevergrad/optimization/test_utils.py
imports: import pickle
  import pytest
  import numpy
  import nevergrad
  from nevergrad.common import testing
  from .test_base import CounterFunction
  from .None import experimentalvariants
  from .None import utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_sequential_executor() without return types