code: def stop_trace(self, frame=None):
          
          self.tracing = False
          self.full = False
          frame = frame or sys._getframe().f_back
          while frame:
              del frame.f_trace
              frame = frame.f_back
          sys.settrace(None)
          log.info('Stopping trace')
docs: Stop tracing from here