def METHOD_NAME(function, parameters, expected_error, expected_message):
    """
    Test `trace` function of `Tracer` class with bad parameters.
    """
    with pytest.raises(expected_error) as excinfo:
        Tracer.trace(function, parameters)
    assert str(excinfo.value) == expected_message