@register.simple_tag(takes_context=True)
def bootstrap_messages(context, *args, **kwargs):

    # Force Django 1.8+ style, so dicts and not Context
    # TODO: This may be due to a bug in Django 1.8/1.9+
    if Context and isinstance(context, Context):
        context = context.flatten()
    context.update({'message_constants': message_constants})
    return render_template_file('bootstrap3/messages.html', context=context)
This function takes a diff (text based) and a map of file names to the coverage for those files and
dataset/ETHPy150Open dyve/django-bootstrap3/bootstrap3/templatetags/bootstrap3.py/bootstrap_messages--crossover with--dataset/ETHPy150Open dropbox/changes/changes/api/source_details.py/SourceDetailsAPIView._filter_coverage_for_added_lines