docstr: Computes gaussian 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 gaussian 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
      """
  
      assumed_var = self.var
      expected_sum = expectations.sum()
      penalty /= self.var
  
      C = observed_sum * expected_sum / assumed_var * (q - 1)
  
      B = expected_sum**2 * (1 - q**2) / (2 * assumed_var)
  
      if C > B and self.direction == "positive":
          ans = C + B
      elif B > C and self.direction == "negative":
          ans = C + B
      else:
          ans = 0
  
      ans -= penalty
  
      return ans
  
file_path: AIF360/aif360/detectors/mdss/ScoringFunctions/Gaussian.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 Gaussian obj's underlying member method code with example usage: obj.score(observed_sum, expectations, penalty, q) and returns: ans