def METHOD_NAME(
    text, expected_len, deny_list
):
    recognizer = PatternRecognizer(
        supported_entity="TITLE",
        name="TitlesRecognizer",
        supported_language="en",
        deny_list=deny_list,
    )
    result = recognizer.analyze(text, entities=["TITLE"])
    assert len(result) == expected_len