def METHOD_NAME(self):
    a = ("a", "b", "c", "d")
    p = (0.5, 0.2, 0.2, 0.1)
    sample = choices_distribution(a, p)[0]
    assert sample in a
    random_state = json.loads((TEST_DIR / "random_state.json").read_text())
    random_state[1] = tuple(random_state[1])
    random.setstate(random_state)
    samples = choices_distribution(a, p, length=100)
    a_pop = len([i for i in samples if i == "a"])
    b_pop = len([i for i in samples if i == "b"])
    c_pop = len([i for i in samples if i == "c"])
    d_pop = len([i for i in samples if i == "d"])
    boundaries = []
    tolerance = 5
    for probability in p:
        boundaries.append([100 * probability + tolerance, 100 * probability - tolerance])
    assert boundaries[0][0] > a_pop > boundaries[0][1]
    assert boundaries[1][0] > b_pop > boundaries[1][1]
    assert boundaries[2][0] > c_pop > boundaries[2][1]
    assert boundaries[3][0] > d_pop > boundaries[3][1]