def METHOD_NAME(
    caplog: pytest.LogCaptureFixture, monkeypatch: pytest.MonkeyPatch
) -> None:
    """
    Test documentation for installing pre-release packages is displayed
    """
    hits: List["TransformedHit"] = [
        {
            "name": "ni",
            "summary": "For knights who say Ni!",
            "versions": ["1.0.0", "1.0.1a"],
        }
    ]
    installed_package = mock.Mock(project_name="ni")
    monkeypatch.setattr("pip._vendor.pkg_resources.working_set", [installed_package])
    get_dist = mock.Mock()
    get_dist.return_value = mock.Mock(version="1.0.0")
    monkeypatch.setattr("pip._internal.commands.search.get_distribution", get_dist)
    with caplog.at_level(logging.INFO):
        print_results(hits)
    message = caplog.records[-1].getMessage()
    assert 'pre-release; install with "pip install --pre"' in message
    assert get_dist.call_args_list == [mock.call("ni")]