def get_env(self, api, builder):
        """Get the Environment object which is declared as a global
        in the module of the wrapped function.
        """
        envname = self.context.get_env_name(self.fndesc)
        gvptr = self.context.declare_env_global(builder.module, envname)
        envptr = builder.load(gvptr)

        env_body = self.context.get_env_body(builder, envptr)

        api.emit_environment_sentry(envptr, return_pyobject=True,
                                    debug_msg=self.fndesc.env_name)
        env_manager = api.get_env_manager(self.env, env_body, envptr)
        return env_manager
Get the Environment object which is declared as a global
        in the module of the wrapped function.
        
numba/core/callwrapper.py