def METHOD_NAME(matrix_name, gap_penalty, ref_lam, ref_k):
    """
    Check if `EValueEstimator` estimates the extreme value distribution
    parameters correctly by comparing them to the parameters described
    in the original publication by Altschul *et al*.
    """
    SAMPLE_LENGTH = 500
    SAMPLE_SIZE = 1000
    alphabet = seq.ProteinSequence.alphabet
    matrix = align.SubstitutionMatrix(alphabet, alphabet, matrix_name)
    np.random.seed(0)
    estimator = align.EValueEstimator.from_samples(
        alphabet, matrix, gap_penalty, BACKGROUND,
        SAMPLE_LENGTH, SAMPLE_SIZE
    )
    # Due to relatively low sample size, expect rather large deviation
    assert estimator.lam == pytest.approx(ref_lam, rel=0.1)
    assert estimator.k == pytest.approx(ref_k, rel=0.6)