docstr: Finds the number of samples already drawn for each result in anchors, their
  comparisons with the instance to be explained and, optionally, coverage.
  
  Parameters
  ----------
  anchors
      Candidate anchors.
  coverages
      If ``True``, the statistics returned contain the coverage of the specified anchors.
  
  Returns
  -------
  Dictionary with lists containing nb of samples used and where sample predictions equal the desired label.
docstr_tok: ["Finds","the","number","of","samples","already","drawn","for","each","result","in","anchors",",","their","comparisons","with","the","instance","to","be","explained","and",",","optionally",",","coverage",".","Parameters","--","--","--","--","--","anchors","Candidate","anchors",".","coverages","If","``","True","``",",","the","statistics","returned","contain","the","coverage","of","the","specified","anchors",".","Returns","--","--","--","-","Dictionary","with","lists","containing","nb","of","samples","used","and","where","sample","predictions","equal","the","desired","label","."]
code: def get_init_stats(self, anchors: list, coverages=False) -> dict:
      """
      Finds the number of samples already drawn for each result in anchors, their
      comparisons with the instance to be explained and, optionally, coverage.
  
      Parameters
      ----------
      anchors
          Candidate anchors.
      coverages
          If ``True``, the statistics returned contain the coverage of the specified anchors.
  
      Returns
      -------
      Dictionary with lists containing nb of samples used and where sample predictions equal the desired label.
      """
  
      def array_factory(size: tuple):
          return lambda: np.zeros(size)
  
      state = self.state
      stats: Dict[str, np.ndarray] = defaultdict(
          array_factory((len(anchors),))
      )
      for i, anchor in enumerate(anchors):
          stats["n_samples"][i] = state["t_nsamples"][anchor]
          stats["positives"][i] = state["t_positives"][anchor]
          if coverages:
              stats["coverages"][i] = state["t_coverage"][anchor]
  
      return stats
  
imports: import copy
  import logging
  from collections import defaultdict, namedtuple
  from typing import Callable, Dict, List, Optional, Set, Tuple
  import numpy
  from alibi.utils.distributions import kl_bernoulli
label_desc: Use image node_id 13 for calling the AnchorBaseBeam obj's underlying member method code with example usage: obj.get_init_stats(anchors, coverages) and returns: stats, function