code: def _kill_managed_threads(self):
          
          num_threads = len(self._managed_threads)
  
          if num_threads:
              _log.warning('killing %s managed thread(s)', num_threads)
              for gt, identifier in list(self._managed_threads.items()):
                  _log.warning('killing managed thread `%s`', identifier)
                  gt.kill()
docs: Kill any currently executing managed threads.
  
          See :meth:`ServiceContainer.spawn_managed_thread`