Expressions like `mod.attr`, where `mod` is a module, are in almost all cases effectively constants. We should optimize them as such. We already treat the `mod` as a constant, so it is a relatively simple step to treat `mod.attr` as a constant. <!-- gh-linked-prs --> ### Linked PRs * gh-115711 <!-- /gh-linked-prs -->