async def METHOD_NAME(service_name: str, endpoint: URL):
    log.info(
        "Connecting to %s",
        f"{service_name=} at {endpoint=}",
    )
    async for attempt in AsyncRetrying(
        # randomizing healthchecks sampling helps parallel execution
        wait=wait_random(1, 2),
        # sets the timeout for a service to become healthy
        stop=stop_after_delay(2 * MINUTE),
        before_sleep=before_sleep_log(log, logging.WARNING),
        reraise=True,
    ):
        with attempt:
            async with aiohttp.ClientSession(
                timeout=_ONE_SEC_TIMEOUT
            ) as session, session.get(endpoint) as response:
                # NOTE: Health-check endpoint require only a status code 200
                # (see e.g. services/web/server/docker/healthcheck.py)
                # regardless of the payload content
                assert (
                    response.status == 200
                ), f"Connection to {service_name=} at {endpoint=} failed with {response=}"
            log.info(
                "Connection to %s succeeded [%s]",
                f"{service_name=} at {endpoint=}",
                json.dumps(attempt.retry_state.retry_object.statistics),
            )