docstr: Given an array of mean result precisions and their upper and lower bounds, determines for which anchors
  more samples need to be drawn in order to estimate the anchors precision with `desired_confidence` and error
  tolerance.
  
  Parameters
  ----------
  means:
      Mean precisions (each element represents a different result).
  ubs:
      Precisions' upper bounds (each element represents a different result).
  lbs:
      Precisions' lower bounds (each element represents a different result).
  desired_confidence:
      Desired level of confidence for precision estimation.
  epsilon_stop:
      Tolerance around desired precision.
  
  Returns
  -------
  Boolean array indicating whether more samples are to be drawn for that particular result.
docstr_tok: ["Given","an","array","of","mean","result","precisions","and","their","upper","and","lower","bounds",",","determines","for","which","anchors","more","samples","need","to","be","drawn","in","order","to","estimate","the","anchors","precision","with","`","desired_confidence","`","and","error","tolerance",".","Parameters","--","--","--","--","--","means",":","Mean","precisions","(","each","element","represents","a","different","result",")",".","ubs",":","Precisions","'","upper","bounds","(","each","element","represents","a","different","result",")",".","lbs",":","Precisions","'","lower","bounds","(","each","element","represents","a","different","result",")",".","desired_confidence",":","Desired","level","of","confidence","for","precision","estimation",".","epsilon_stop",":","Tolerance","around","desired","precision",".","Returns","--","--","--","-","Boolean","array","indicating","whether","more","samples","are","to","be","drawn","for","that","particular","result","."]
code: def to_sample(
      means: np.ndarray,
      ubs: np.ndarray,
      lbs: np.ndarray,
      desired_confidence: float,
      epsilon_stop: float,
  ):
      """
      Given an array of mean result precisions and their upper and lower bounds, determines for which anchors
      more samples need to be drawn in order to estimate the anchors precision with `desired_confidence` and error
      tolerance.
  
      Parameters
      ----------
      means:
          Mean precisions (each element represents a different result).
      ubs:
          Precisions' upper bounds (each element represents a different result).
      lbs:
          Precisions' lower bounds (each element represents a different result).
      desired_confidence:
          Desired level of confidence for precision estimation.
      epsilon_stop:
          Tolerance around desired precision.
  
      Returns
      -------
      Boolean array indicating whether more samples are to be drawn for that particular result.
      """
  
      return (
          (means >= desired_confidence)
          & (lbs < desired_confidence - epsilon_stop)
      ) | (
          (means < desired_confidence)
          & (ubs >= desired_confidence + epsilon_stop)
      )
  
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 15 for calling the AnchorBaseBeam obj's underlying member method code with example usage: obj.to_sample(means, ubs, lbs, desired_confidence, epsilon_stop) and returns: unknown