docstr: Computes poisson bias score for given q
  
  :param observed_sum: sum of observed binary outcomes for all i
  :param expectations: predicted outcomes for each data element i
  :param penalty: penalty term. Should be positive
  :param q: current value of q
  :return: bias score for the current value of q
code: def score(
      self,
      observed_sum: float,
      expectations: np.array,
      penalty: float,
      q: float,
  ):
      """
      Computes poisson bias score for given q
  
      :param observed_sum: sum of observed binary outcomes for all i
      :param expectations: predicted outcomes for each data element i
      :param penalty: penalty term. Should be positive
      :param q: current value of q
      :return: bias score for the current value of q
      """
  
      assert q > 0, (
          "Warning: calling compute_score_given_q with "
          "observed_sum=%.2f, expectations of length=%d, penalty=%.2f, q=%.2f"
          % (observed_sum, len(expectations), penalty, q)
      )
  
      ans = (
          observed_sum * np.log(q)
          + (expectations - q * expectations).sum()
          - penalty
      )
      return ans
  
file_path: AIF360/aif360/detectors/mdss/ScoringFunctions/Poisson.py
imports: from aif360.detectors.mdss.ScoringFunctions.ScoringFunction import ScoringFunction
  from aif360.detectors.mdss.ScoringFunctions import optim
  import numpy
label_desc: Use image node_id 2 for calling the Poisson obj's underlying member method code with example usage: obj.score(observed_sum, expectations, penalty, q) and returns: ans