docs: def _weight_generator(self, reviewers):
          """Compute a weight function for the given reviewers.
  
          Args:
            reviewers: a set of reviewers to compute weight function.
  
          Returns:
            a function computing a weight for a reviewer.
          """
          scores = [r.anomalous_score for r in reviewers]
          mu = np.average(scores)
          sigma = np.std(scores)
  
          if sigma:
              def w(v):
                  """Compute a weight for the given reviewer.
  
                  Args:
                    v: anomalous score of a reviewer.
                  Returns:
                    weight of the given anomalous score.
                  """
                  try:
                      exp = math.exp(self.alpha * (v - mu) / sigma)
                      return 1. / (1. + exp)
                  except OverflowError:
                      return 0.
  
              return w
  
          else:
              # Sigma = 0 means all reviews have same anomalous scores.
              # In this case, all reviews should be treated as same.
              return lambda v: 1.