code: def kl_bernoulli(p, q):
      p = min(0.9999999999999999, max(0.0000001, p))
      q = min(0.9999999999999999, max(0.0000001, q))
      return p * np.log(float(p) / q) + (1 - p) * np.log(
          float(1 - p) / (1 - q)
      )
  
file_path: anchor/anchor/anchor_base.py
imports: from __future__ import print_function
  import numpy
  import operator
  import copy
  import sklearn
  import collections
label_desc: Use image node_id 2 for calling the AnchorBaseBeam obj's underlying member method code with example usage: obj.kl_bernoulli(p, q) and returns: unknown