See https://discourse.julialang.org/t/is-there-a-way-to-determine-whether-code-is-toplevel and https://discourse.julialang.org/t/should-macros-get-an-istoplevel-or-scope-argument