def _inject_template_globals(app, funcs):
    """Inject a set of functions into a Flask app as template_globals.

    Args:
        app (object): The Flask application.
        funcs (dict): A dictionary of name and functions.

    Returns:
        app (object): The Flask application.
    """
    for name, func in funcs.iteritems():
        app.add_template_global(name, func)
    return app
