def METHOD_NAME(pars):
    assert pars[1].name == "ham"
    assert pars["ham"].name == "ham"
    assert pars[pars[1]].name == "ham"
    with pytest.raises(TypeError):
        pars[42.3]
    with pytest.raises(IndexError):
        pars[3]
    with pytest.raises(IndexError):
        pars["lamb"]
    with pytest.raises(ValueError):
        pars[Parameter("bam!", 99)]