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