def METHOD_NAME(name: str) -> None:
    from ckan.lib.helpers import url_for_static_or_external
    if not hasattr(g, "_webassets"):
        log.debug("Initialize fresh assets collection")
        g._webassets = _make_asset_collection()
    if name in g._webassets["included"]:
        return
    if not is_registered(name):
        log.error("Trying to include unknown asset: %s", name)
        return
    bundle: Any = env[name]
    deps: list[str] = bundle.extra.get("preload", [])
    # mark current asset as included in order to avoid recursion while loading
    # dependencies
    g._webassets["included"].add(name)
    for dep in deps:
        METHOD_NAME(dep)
    # Add `site_root` if configured
    urls = [url_for_static_or_external(url) for url in bundle.urls()]
    for url in urls:
        link = url.split("?")[0]
        if link.endswith(".css"):
            type_ = "style"
            break
        elif link.endswith(".js"):
            type_ = "script"
            break
    else:
        log.warn("Undefined asset type: %s", urls)
        return
    g._webassets[type_].extend(urls)