code: def _sample(probabilities, population_size):
      
      population = []
      for _ in range(population_size):
          solution = []
          for probability in probabilities:
              # probability of 1.0: always 1
              # probability of 0.0: always 0
              if random.uniform(0.0, 1.0) < probability:
                  solution.append(1)
              else:
                  solution.append(0)
          population.append(solution)
      return population
docs: Return a random population, drawn with regard to a set of probabilities