def METHOD_NAME(
    request_function: Callable[..., Awaitable[Any]],
    args: Any,
    kwargs: dict[str, Any],
    *,
    exc_info: bool = False,
) -> Callable[[RetryCallState], None]:
    """Before call strategy that logs to some logger the attempt."""
    def log_it(retry_state: "RetryCallState") -> None:
        assert retry_state.outcome  # nosec
        if retry_state.outcome.failed:
            ex = retry_state.outcome.exception()
            verb, value = "raised", f"{ex.__class__.__name__}: {ex}"
            if exc_info:
                local_exc_info = retry_state.outcome.exception()
            else:
                local_exc_info = False
        else:
            verb, value = "returned", retry_state.outcome.result()
            local_exc_info = False  # exc_info does not apply when no exception
        assert retry_state.next_action  # nosec
        logger.warning(
            "Retrying '%s %s %s' in %s seconds as it %s %s. %s",
            request_function.__name__,
            f"{args=}",
            f"{kwargs=}",
            retry_state.next_action.sleep,
            verb,
            value,
            retry_state.retry_object.statistics,
            exc_info=local_exc_info,
        )
    return log_it