def METHOD_NAME(ctx: Context, asset: str, **kwargs: t.Any) -> str:
    """
    Build an URL for an asset generated by webpack.
    To prevent Jinja2 from inlining the calls of this filter with constant
    parameters, this filter needs to be declared as a context filter. The
    context is not actually used.
    :param ctx: Template context
    :param asset: Name of the
    :param kwargs: Kwargs for :func:`url_for`
    :return: URL
    """
    asset_map, has_changed = current_app.extensions.get('webpack', (None, None))
    if asset_map is None or has_changed():
        path = pathlib.Path(current_app.static_folder, 'manifest.json')
        current_app.logger.info("Loading webpack manifest from %s", path)
        try:
            mtime = path.stat().st_mtime
        except FileNotFoundError as e:
            raise RuntimeError("manifest.json not found. Did you forget"
                               " to execute webpack? You might want to"
                               " take a look at the readme.md.") from e
        with path.open() as f:
            asset_map = json.load(f)
        def has_changed() -> bool:
            try:
                return path.stat().st_mtime != mtime
            except OSError:
                return False
        current_app.extensions['webpack'] = asset_map, has_changed
    try:
        filename = asset_map[asset]
    except KeyError:
        raise AssetNotFound(f"Asset {asset} not found") from None
    kwargs["filename"] = filename
    return url_for("static", **kwargs)