### Is there an existing issue for this? - [x] I have searched the existing issues ### Problem statement Let `python_ast.Tree.extend_globals` accept a `Tree` as argument ### Proposed Solution Requires refactoring the inherited context to pass a tree instead of globals ### Additional Context _No response_