def METHOD_NAME(top_elements):
    return [
        {
            "name": element["name"],
            "count": element["count"],
            "rank": index,
        }
        for index, element in enumerate(top_elements)
    ]