def METHOD_NAME(locale, topics=None, products=None):
    """Returns a list of articles that apply to passed in locale, topics and products."""
    # First try to get the results from the cache
    cache_key = _cache_key(locale, topics, products)
    documents_cache_key = f"documents_for:{cache_key}"
    documents = cache.get(documents_cache_key)
    if documents is not None:
        return documents
    qs = Document.objects.filter(
        locale=locale,
        is_archived=False,
        current_revision__isnull=False,
        category__in=settings.IA_DEFAULT_CATEGORIES,
    )
    # speed up query by removing any ordering, since we're doing it in python:
    qs = qs.select_related("current_revision", "parent").order_by()
    for topic in topics or []:
        # we need to filter against parent topics for localized articles
        qs = qs.filter(Q(topics=topic) | Q(parent__topics=topic))
    for product in products or []:
        # we need to filter against parent products for localized articles
        qs = qs.filter(Q(products=product) | Q(parent__products=product))
    qs = qs.distinct()
    votes_cache_key = f"votes_for:{cache_key}"
    votes_dict = cache.get(votes_cache_key)
    if votes_dict is None:
        votes_query = (
            HelpfulVote.objects.filter(
                revision_id__in=qs.values_list("current_revision_id", flat=True),
                created__gt=datetime.now() - timedelta(days=30),
                helpful=True,
            )
            .values("revision_id")
            .annotate(count=Count("*"))
            .values("revision_id", "count")
        )
        votes_dict = {row["revision_id"]: row["count"] for row in votes_query}
        # the votes query is rather expensive, and only used for ordering,
        # so we can cache it rather aggressively
        cache.set(votes_cache_key, votes_dict, timeout=settings.CACHE_LONG_TIMEOUT)
    doc_dicts = []
    for d in qs:
        doc_dicts.append(
            dict(
                id=d.id,
                document_title=d.title,
                url=d.get_absolute_url(),
                document_parent_id=d.parent_id,
                document_summary=d.current_revision.summary,
                display_order=d.original.display_order,
                helpful_votes=votes_dict.get(d.current_revision_id, 0),
            )
        )
    # sort the results by ascending display_order and descending votes
    doc_dicts.sort(key=lambda x: (x["display_order"], -x["helpful_votes"]))
    cache.set(documents_cache_key, doc_dicts)
    return doc_dicts