class_docstr: Thread that runs a function taking another function as input. Each call of the inner function
  adds the point given by the algorithm into the ask queue and then blocks until the main thread sends
  the result back into the tell queue.
  
  Note
  ----
  This thread must be overlaid into another MessagingThread  because:
  - the threading part should hold no reference from outside (otherwise the destructors may wait each other)
  - the destructor cannot be implemented, hence there is no way to stop the thread automatically
class_docstr_tok: ["Thread","that","runs","a","function","taking","another","function","as","input",".","Each","call","of","the","inner","function","adds","the","point","given","by","the","algorithm","into","the","ask","queue","and","then","blocks","until","the","main","thread","sends","the","result","back","into","the","tell","queue",".","Note","--","--","This","thread","must","be","overlaid","into","another","MessagingThread","because",":","-","the","threading","part","should","hold","no","reference","from","outside","(","otherwise","the","destructors","may","wait","each","other",")","-","the","destructor","can","not","be","implemented",",","hence","there","is","no","way","to","stop","the","thread","automatically"]
docstr: Puts a new point into the ask queue to be evaluated on the
  main thread and blocks on get from tell queue until point
  is evaluated on main thread and placed into tell queue when
  it is then returned to the caller.
docstr_tok: ["Puts","a","new","point","into","the","ask","queue","to","be","evaluated","on","the","main","thread","and","blocks","on","get","from","tell","queue","until","point","is","evaluated","on","main","thread","and","placed","into","tell","queue","when","it","is","then","returned","to","the","caller","."]
code: def _fake_callable(self, *args: tp.Any) -> tp.Any:
      """
      Puts a new point into the ask queue to be evaluated on the
      main thread and blocks on get from tell queue until point
      is evaluated on main thread and placed into tell queue when
      it is then returned to the caller.
      """
      self.call_count += 1
      self.messages_ask.put(args[0])  # sends a message
      candidate = self.messages_tell.get()  # get evaluated message
      if candidate is None:
          raise StopOptimizerThread()
      return candidate
  
imports: import warnings
  import threading
  import queue
  import numpy
  import nevergrad.common.typing
  from nevergrad.common.errors import NevergradError
  from nevergrad.parametrization import parameter
  from .None import base
  from .base import IntOrParameter
label_desc: Use image node_id 3 for calling the _MessagingThread obj's underlying member method code with example usage: obj._fake_callable() and returns: candidate