def METHOD_NAME():
    """Test sampling from yaml, including constraints"""
    with open("examples/yaml/demo_hyperparameter_sampling.yml", "r") as stream:
        config = yaml.safe_load(stream)
    samples = sample_hyperparameters(config)
    a1samples = samples[samples['algo'] == 'Algo1']
    for par in a1samples['params']:
        assert par['p1'] < par['p2']
        assert par['p3'] < par['p2']
        assert par['p2'] % 1 == pytest.approx(0)
        assert par['p4'] == par['p3']
        assert par['p5'] == 2 * par['p3'] / par['p1']
    a2samples = samples[samples['algo'] == 'Algo2']
    for par in a2samples['params']:
        assert par['p1'] % 2 == pytest.approx(1)
        assert par['p2'] % 1 == pytest.approx(0)
        assert par['p3'] == 2 * par['p2']
        p_4 = par['p4']
        assert p_4 == 30 or p_4 == 31 or p_4 == 100
    a3samples = samples[samples['algo'] == 'Algo3']
    assert not a3samples.empty