code: def _loop_thread_main(self):
          
  
          asyncio.set_event_loop(self.loop)
          self._loop_check.inside_loop = True
  
          try:
              self._logger.debug("Starting loop in background thread")
              self.loop.run_forever()
              self._logger.debug("Finished loop in background thread")
          except:  # pylint:disable=bare-except;This is a background worker thread.
              self._logger.exception("Exception raised from event loop thread")
          finally:
              self.loop.close()
docs: Main background thread running the event loop.