docstr: Similar to :py:meth:`alibi.utils.distributed.ActorPool.map`, but returning an unordered iterator.
  This returns an unordered iterator that will return results of the map as they finish. This can be more
  efficient that :py:meth:`alibi.utils.distributed.ActorPool.map` if some results take longer to compute
  than others.
  
  Parameters
  ----------
  fn : Callable
      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.
  values : list
      List of values that `fn(actor, value)` should be applied to.
  chunksize : int
      Splits the list of values to be submitted to the parallel process into sublists of size chunksize or less.
  
  Returns
  -------
  Iterator over results from applying `fn` to the `actors` and `values`.
  
  Examples
  --------
  >>> pool = ActorPool(...)
  >>> print(pool.map(lambda a, v: a.double.remote(v), [1, 2, 3, 4]))
  [6, 2, 4, 8]
code: def map_unordered(self, fn, values, chunksize=1):
      """
      Similar to :py:meth:`alibi.utils.distributed.ActorPool.map`, but returning an unordered iterator.
      This returns an unordered iterator that will return results of the map as they finish. This can be more
      efficient that :py:meth:`alibi.utils.distributed.ActorPool.map` if some results take longer to compute
      than others.
  
      Parameters
      ----------
      fn : Callable
          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.
      values : list
          List of values that `fn(actor, value)` should be applied to.
      chunksize : int
          Splits the list of values to be submitted to the parallel process into sublists of size chunksize or less.
  
      Returns
      -------
      Iterator over results from applying `fn` to the `actors` and `values`.
  
      Examples
      --------
      >>> pool = ActorPool(...)
      >>> print(pool.map(lambda a, v: a.double.remote(v), [1, 2, 3, 4]))
      [6, 2, 4, 8]
      """
  
      values = self._chunk(values, chunksize=chunksize)
  
      for v in values:
          self.submit(fn, v)
      while self.has_next():
          yield self.get_next_unordered()
  
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 3 for calling the ActorPool obj's underlying member method code with example usage: obj.map_unordered(fn, values, chunksize) without return types