def METHOD_NAME(snap):
    try:
        blog_tags = blog_api.get_tag_by_slug(f"sc:snap:{snap}")
    except NotFoundError:
        blog_tags = None
    blog_articles = None
    articles = []
    if blog_tags:
        snapcraft_tag = blog_api.get_tag_by_slug("snapcraft.io")
        try:
            blog_articles, total_pages = blog_api.get_articles(
                tags=blog_tags["id"],
                tags_exclude=[3184, 3265, 3408],
                per_page=3 - len(articles),
            )
        except RequestException:
            blog_articles = []
        for article in blog_articles:
            if article["image"]:
                featured_media = image_template(
                    url=article["image"]["source_url"],
                    alt="",
                    width="346",
                    height="231",
                    fill=True,
                    hi_def=True,
                    loading="auto",
                )
            else:
                featured_media = None
            url = f"/blog/{article['slug']}"
            if snapcraft_tag["id"] not in article["tags"]:
                url = f"https://ubuntu.com{url}"
            articles.append(
                {
                    "slug": url,
                    "title": article["title"]["rendered"],
                    "image": featured_media,
                }
            )
    return flask.jsonify(articles)