code: def forever(klass, *args, **kws):
          
          with klass(*args, **kws):
              _log.info("Running server")
              try:
                  while True:
                      time.sleep(100)
              except KeyboardInterrupt:
                  pass
              finally:
                  _log.info("Stopping server")
docs: Create a server and block the calling thread until KeyboardInterrupt.
          Shorthand for: ::
  
              with Server(*args, **kws):
                  try;
                      time.sleep(99999999)
                  except KeyboardInterrupt:
                      pass