Simplified version. Not distributed friendly.

def _get_dispatches(filter_kwargs):
    """Simplified version. Not distributed friendly."""

    dispatches = Dispatch.objects.prefetch_related('message').filter(
        **filter_kwargs
    ).order_by('-message__time_created')

    return list(dispatches)