export_method_environment
if ((env = export_method_environment(pg)) != NULL) {
env = export_method_environment(pg);