class_docstr: A class that orchestrates the execution of the execution of a batch of explanations in parallel.
class_docstr_tok: ["A","class","that","orchestrates","the","execution","of","the","execution","of","a","batch","of","explanations","in","parallel","."]
docstr: Accesses actor attributes. Use sparingly as this involves a remote call (that is, these attributes are of an
  object in a different process). *The intended use is for retrieving any common state across the actor at the end
  of the computation in order to form the response (see notes 2 & 3)*.
  
  Parameters
  ----------
  item
      The explainer attribute to be returned.
  
  Returns
  -------
  The value of the attribute specified by `item`.
  
  Raises
  ------
  ValueError
      If the actor index is invalid.
  
  Notes
  -----
      1. This method assumes that the actor implements a `return_attribute` method.
      2. Note that we are indexing the idle actors. This means that if a pool was initialised with 5 actors             and 3 are busy, indexing with index 2 will raise an `IndexError`.
      3. The order of `_idle_actors` constantly changes - an actor is removed from it if there is a task to             execute and appended back when the task is complete. Therefore, indexing at the same position as             computation proceeds will result in retrieving state from different processes.
code: def __getattr__(self, item: str) -> Any:
      """
          Accesses actor attributes. Use sparingly as this involves a remote call (that is, these attributes are of an
          object in a different process). *The intended use is for retrieving any common state across the actor at the end
          of the computation in order to form the response (see notes 2 & 3)*.
  
          Parameters
          ----------
          item
              The explainer attribute to be returned.
  
          Returns
          -------
          The value of the attribute specified by `item`.
  
          Raises
          ------
          ValueError
              If the actor index is invalid.
  
          Notes
          -----
              1. This method assumes that the actor implements a `return_attribute` method.
              2. Note that we are indexing the idle actors. This means that if a pool was initialised with 5 actors \
              and 3 are busy, indexing with index 2 will raise an `IndexError`.
              3. The order of `_idle_actors` constantly changes - an actor is removed from it if there is a task to \
              execute and appended back when the task is complete. Therefore, indexing at the same position as \
              computation proceeds will result in retrieving state from different processes.
  
          """  # noqa W605
  
      if self._actor_index > self.n_processes - 1:
          raise ValueError(
              f"Index of actor should be less than or equal to {self.n_processes - 1}!"
          )
  
      actor = self.pool._idle_actors[self._actor_index]  # noqa
      return ray.get(actor.return_attribute.remote(item))
  
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 2 for calling the DistributedExplainer obj's underlying member method code with example usage: obj.__getattr__(item) and returns: ray