docstr: Parameters
  ---------
  samplers
      Objects that can be called with args (`result`, `n_samples`) tuple to draw samples.
docstr_tok: ["Parameters","--","--","--","--","-","samplers","Objects","that","can","be","called","with","args","(","`","result","`",",","`","n_samples","`",")","tuple","to","draw","samples","."]
code: def __init__(self, samplers: List[Callable], **kwargs) -> None:
      """
      Parameters
      ---------
      samplers
          Objects that can be called with args (`result`, `n_samples`) tuple to draw samples.
      """
  
      self.sample_fcn = samplers[0]
      self.samplers: Optional[List[Callable]] = None
      # Initial size (in batches) of data/raw data samples cache.
      self.sample_cache_size = kwargs.get("sample_cache_size", 10000)
      # when only the max of self.margin or batch size remain emptpy, the cache is
      # extended to accommodate an additional sample_cache_size batches.
      self.margin = kwargs.get("cache_margin", 1000)
  
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 1 to create a new AnchorBaseBeam object  with example: obj = AnchorBaseBeam(samplers)