def stars_template(rating: float) -> list:
    """Flex Message 星星圖示

    Args:
        rating (float): 餐廳 Google Maps 評價

    Returns:
        list: 星星圖示
    """
    star = {
        "type": "icon",
        "size": "sm",
        "url": "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png",
    }
    grey_star = {
        "type": "icon",
        "size": "sm",
        "url": "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gray_star_28.png",
    }
    star_list = int(rating) * [star] + (5 - int(rating)) * [grey_star]
    return star_list