MAINT: remove globals() as suggested by @evr-br