docstr: Schedule a single task to run in the pool. This has the same argument semantics as
  :py:meth:`alibi.utils.distributed.ActorPool.map`, but takes on a single value instead of a list of values.
  The result can be retrieved using :py:meth:`alibi.utils.distributed.ActorPool.get_next()` /
  :py:meth:`alibi.utils.distributed.ActorPool.get_next_unordered()`.
  
  Parameters
  ----------
  fn
      Function that takes `(actor, value)` as argument and returns an `ObjectID` computing the result over
      the `value`. The `actor` will be considered busy until the `ObjectID` completes.
  value
      Value to compute a result for.
  
  Examples
  --------
  >>> pool = ActorPool(...)
  >>> pool.submit(lambda a, v: a.double.remote(v), 1)
  >>> pool.submit(lambda a, v: a.double.remote(v), 2)
  >>> print(pool.get_next(), pool.get_next())
  2, 4
code: def submit(self, fn: Callable, value: object):
      """
      Schedule a single task to run in the pool. This has the same argument semantics as
      :py:meth:`alibi.utils.distributed.ActorPool.map`, but takes on a single value instead of a list of values.
      The result can be retrieved using :py:meth:`alibi.utils.distributed.ActorPool.get_next()` /
      :py:meth:`alibi.utils.distributed.ActorPool.get_next_unordered()`.
  
      Parameters
      ----------
      fn
          Function that takes `(actor, value)` as argument and returns an `ObjectID` computing the result over
          the `value`. The `actor` will be considered busy until the `ObjectID` completes.
      value
          Value to compute a result for.
  
      Examples
      --------
      >>> pool = ActorPool(...)
      >>> pool.submit(lambda a, v: a.double.remote(v), 1)
      >>> pool.submit(lambda a, v: a.double.remote(v), 2)
      >>> print(pool.get_next(), pool.get_next())
      2, 4
      """
      if self._idle_actors:
          actor = self._idle_actors.pop()
          future = fn(actor, value)
          self._future_to_actor[future] = (self._next_task_index, actor)
          self._index_to_future[self._next_task_index] = future
          self._next_task_index += 1
      else:
          self._pending_submits.append((fn, value))
  
imports: import copy
  import logging
  from functools import partial
  from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Union
  import numpy
  from scipy import sparse
  import ray
label_desc: Use image node_id 4 for calling the ActorPool obj's underlying member method code with example usage: obj.submit(fn, value) without return types