code: def user_return(self, frame, return_value):
      
      # This is useful when debugging in an active interpreter (otherwise,
      # the debugger will stop before reaching the target file)
      if self._wait_for_mainpyfile:
          if (self.mainpyfile != self.canonic(frame.f_code.co_filename)
              or frame.f_lineno<= 0):
              return
          self._wait_for_mainpyfile = 0
      self._old_Pdb_user_return(frame, return_value)
docs: This function is called when a return trap is set here.