code: def _pdf_value(pdf, population, fitnesses, fitness_threshold):
      
      # Add the chance of obtaining a solution from the pdf
      # when the fitness for that solution exceeds a threshold
      value = 0.0
      for solution, fitness in zip(population, fitnesses):
          if fitness >= fitness_threshold:
              # 1.0 + chance to avoid issues with chance of 0
              value += math.log(1.0 + _chance(solution, pdf))
  
      # The official equation states that value is now divided by len(fitnesses)
      # however, this is unnecessary when we are only obtaining the best pdf,
      # because every solution is of the same size
      return value
docs: Give the value of a pdf.
  
      This represents the likelihood of a pdf generating solutions
      that exceed the threshold.