gh-121272: move async for/with validation from compiler to symtable by iritkatriel · Pull Request #121361 · python/cpython
That would unnecessarily make this function specific to stmt_ty. There is likely to be an expr_ty luse case for it as well.
In general, a function is ideally passed what it actually needs (unless its purpose is to abstract something out).