def user_return(self, frame, return_value):
        """This function is called when a return trap is set here."""
        frame.f_locals['__return__'] = return_value
        self.message('--Return--')
        self.interaction(frame, None)
This function is called when a return trap is set here.