def METHOD_NAME():
    """Test sampling from yaml, including constraints"""
    with open("examples/yaml/demo_hyperparameter_gridsearch.yml", "r", encoding="utf-8") \
            as stream:
        config = yaml.safe_load(stream)
    samples = sample_gridsearch(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
    # test sampling seed
    sample_gridsearch({'output_dir': "zoutput/benchmarks/test",
                       'Task1': {'aname': 'Algo1',
                                 'hyperparameters':
                                     {'p1': {'min': 0, 'max': 1, 'step': 0,
                                             'distribution': 'uniform', 'num': 2}}}},
                          sampling_seed=0)