def METHOD_NAME(app):
    from flexmeasures.ui.utils.view_utils import asset_icon_name, username, accountname
    app.jinja_env.filters["zip"] = zip  # Allow zip function in templates
    app.jinja_env.add_extension(
        "jinja2.ext.do"
    )  # Allow expression statements (e.g. for modifying lists)
    app.jinja_env.filters["localized_datetime"] = localized_datetime_str
    app.jinja_env.filters["naturalized_datetime"] = naturalized_datetime_str
    app.jinja_env.filters["naturalized_timedelta"] = naturaldelta
    app.jinja_env.filters["capitalize"] = capitalize
    app.jinja_env.filters["pluralize"] = pluralize
    app.jinja_env.filters["parameterize"] = parameterize
    app.jinja_env.filters["isnull"] = pd.isnull
    app.jinja_env.filters["hide_nan_if_desired"] = (
        lambda x: ""
        if x in ("nan", "nan%", "NAN")
        and current_app.config.get("FLEXMEASURES_HIDE_NAN_IN_UI", False)
        else x
    )
    app.jinja_env.filters["asset_icon"] = asset_icon_name
    app.jinja_env.filters["username"] = username
    app.jinja_env.filters["accountname"] = accountname
    app.jinja_env.filters[
        "parse_config_entry_by_account_roles"
    ] = parse_config_entry_by_account_roles
    app.jinja_env.filters[
        "find_first_applicable_config_entry"
    ] = find_first_applicable_config_entry