def _format_results(results: dict):
    """Return formatted dictionary containing term and relevance.

    Args:
        results (dict): JSON dictionary of Google Autocomplete results.

    Returns:
        suggestions (dict): Formatted dictionary containing term and relevance.
    """

    if results:
        suggestions = []
        for index, value in enumerate(results[1]):
            suggestion = {'term': value, 'relevance': results[4]['google:suggestrelevance'][index]}
            suggestions.append(suggestion)
        return suggestions