def METHOD_NAME(data: Any, handler: Callable[[list[str], str], None], tags: list[str] = []) -> None:
    # processes arbitrary nested structure of dicts and lists which
    # is possible in conandata.yaml files
    if isinstance(data, list):
        for item in data:
            METHOD_NAME(item, handler, tags)
    elif isinstance(data, dict):
        for key, item in data.items():
            METHOD_NAME(item, handler, tags + [key])
    elif isinstance(data, str):
        handler(tags, data)