async def METHOD_NAME(endpoint_by_key):
    logger = logging.get_logger("CommunityAnalysis")
    bots_stats = {}
    async def get_stats(url, stats_key):
        try:
            async with aiohttp.ClientSession() as session:
                async with session.get(url) as resp:
                    if resp.status != 200:
                        logger.error(f"Error when getting community status : error code={resp.status}")
                    else:
                        json_resp = await resp.json()
                        if "total" in json_resp:
                            bots_stats[stats_key] = json_resp["total"]
                        else:
                            bots_stats[stats_key] = _format_top_elements(json_resp)
        except Exception as e:
            logger.exception(e, True, f"Error when getting community status : {e}")
    await asyncio.gather(
        *(
            get_stats(endpoint, key)
            for key, endpoint in endpoint_by_key.items()
        )
    )
    await _ensure_closed_sockets()
    return bots_stats