def save_module_dict(self, obj, main_dict=vars(__import__('__main__'))):
    """ Special-case __main__.__dict__. Useful for a function's func_globals member. """
    if obj is main_dict:
        save_global_byname(self, obj, '__main__', '__dict__')
    else:
        return pickle.Pickler.save_dict(self, obj)      # fallback to original 
 Special-case __main__.__dict__. Useful for a function's func_globals member. 
recipes/Python/572213_Pickle_interactive_interpreter/recipe-572213.py