'Check distribution of some samples.'

def _check_dist(self, pop, samples):

    self.assertGreaterEqual(len(samples), (len(pop) * 100))
    expected_frequency = (len(samples) / len(pop))
    c = collections.Counter(samples)
    for value in pop:
        n = c[value]
        self.assertGreaterEqual(n, (expected_frequency * 0.5))
        self.assertLessEqual(n, (expected_frequency * 2.0))
