def METHOD_NAME(json):
    search_results = json.get('expertResponses')
    if search_results:
        search_results = search_results[0].get('advice')
    else:  # response from a 'nextResultSet'
        search_results = json.get('advice')
    results = []
    if not search_results:
        return results
    for result in search_results['results']:
        summary = loads(result['summary'])
        results.append(
            {
                'template': 'images.html',
                'url': summary['refererurl'],
                'title': result['title'],
                'img_src': result['url'],
                'img_format': f"{summary['width']}x{summary['height']}",
                'thumbnail_src': 'https://media.seekr.com/engine/rp/' + summary['tg'] + '/?src= ' + result['thumbnail'],
            }
        )
    if search_results.get('nextResultSet'):
        results.append(
            {
                "engine_data": search_results.get('nextResultSet'),
                "key": "nextpage",
            }
        )
    return results