def history_renderer(user, history,
                     hist_type, return_type,
                     empty_search_msg,
                     template, get_params=None,
                     following=None):

    if return_type == "html":
        
        if not empty_search_msg:
            empty_search_msg = EMPTY_SEARCH_MSG['home_stream']

        template_values = {
            'history': history,
            'hist_type': hist_type,
            # if requesting profile page or feed
            'username': get_params.get('username', None),
            'user': user,
            'empty_search_msg': empty_search_msg,
            'following': following,
            'filter': get_params.get('filter') if get_params else None
        }

        if get_params:
            template_values['link_mod'] = "&" + urllib.urlencode(get_params)
        return render_to_string('live_stream/timeline.html', template_values)

    elif return_type == "list":
        history_list = []

        for h_item in history:
            history_list.append(
                render_to_string('live_stream/%s.html' % template,
                                 {
                                     'item': h_item,
                                     'user': user,
                                 })
            )

        return history_list
Used to create the dict required to create a new queue
dataset/ETHPy150Open haystack/eyebrowse-server/live_stream/renderers.py/history_renderer--crossover with--dataset/ETHPy150Open rackspace/pyrax/pyrax/image.py/ImageManager._create_body