def type2icon(context, kind):
    """
    Render the given UpdateType as a span containing an icon.

    Args:
        context (mako.runtime.Context): Unused.
        severity (bodhi.server.models.UpdateType): The UpdateType to render as a span
            tag.
    Returns:
        str: An HTML span tag representing the UpdateType.
    """
    kind = str(kind)
    if kind[0].lower() in 'aeiou':
        kind_article = 'an'
    else:
        kind_article = 'a'
    fontawesome = {'security': 'fa-shield', 'bugfix': 'fa-bug',
        'newpackage': 'fa-archive', 'enhancement': 'fa-bolt', 'unspecified':
        'fa-circle-o'}.get(kind)
    span = (
        "<span data-toggle='tooltip' title='This is %s %s update'><i class='fa fa-fw %s'></i></span>"
        )
    return span % (kind_article, kind, fontawesome)
