def METHOD_NAME(top_p_sampler):
    query = "What is the most important building in King's Landing that has a religious background?"
    results = top_p_sampler.predict(query=query, documents=docs, top_p=0.9)
    # The top_p sampler should always return at least one result if strict is False (default)
    # in this case the result with the highest prob score is returned even if top p is too low
    assert len(results) == 1
    assert results[0].id == "5"
    # unless strict is set to True
    sampler = TopPSampler(strict=True)
    results = sampler.predict(query=query, documents=docs, top_p=0.9)
    assert len(results) == 0