code: def handle_timeout(self, signum, frame):
          
          logger.debug("Function is about to timeout, sending report")
          self.report.prepare(TimeoutError("Timeout Exceeded."), frame)
          self.run_hooks("pre:report")
          self.report.send()
          self.run_hooks("post:report")
          self.wait_for_futures()
docs: Catches a timeout (SIGALRM) and sends the report before actual timeout occurs.
  
          The signum and frame parameters are passed by the signal module to this handler.
  
          :param signum: The signal number being handled.
          :param frame: The stack frame when signal was raised.