def METHOD_NAME(monkeypatch):
    instance_tags = []
    check = KubeProxyCheck(CHECK_NAME, {}, [instance])
    monkeypatch.setattr(check, 'service_check', mock.Mock())
    calls = [
        mock.call(NAMESPACE + '.up', AgentCheck.OK, tags=instance_tags),
        mock.call(NAMESPACE + '.up', AgentCheck.CRITICAL, tags=instance_tags, message='health check failed'),
    ]
    # successful health check
    with mock.patch("requests.get", return_value=mock.MagicMock(status_code=200)):
        check._perform_service_check(instance)
    # failed health check
    raise_error = mock.Mock()
    raise_error.side_effect = requests.HTTPError('health check failed')
    with mock.patch("requests.get", return_value=mock.MagicMock(raise_for_status=raise_error)):
        check._perform_service_check(instance)
    check.service_check.assert_has_calls(calls)