def render_published_by_badge(request, surface):
    """Returns a HMTL snippet with a badge about who published a given surface.
    """
    return {
        'surface': surface,
        'is_publisher': request.user == surface.publication.publisher
    }