code: def _collect_plugin(self, plugin):
          '''Wraps the collect_plugin() method so we can apply a timeout
          against the plugin as a whole'''
          with ThreadPoolExecutor(1) as pool:
              try:
                  t = pool.submit(self.collect_plugin, plugin)
                  # Re-type int 0 to NoneType, as otherwise result() will treat
                  # it as a literal 0-second timeout
                  timeout = self.loaded_plugins[plugin[0]-1][1].timeout or None
                  t.result(timeout=timeout)
              except TimeoutError:
                  self.ui_log.error("\n Plugin %s timed out\n" % plugin[1])
                  self.running_plugs.remove(plugin[1])
                  self.loaded_plugins[plugin[0]-1][1]._timeout_hit = True
                  pool._threads.clear()
          return Truf _collect_plugin(self, plugin):
          '''Wraps the collect_plugin() method so we can apply a timeout
          against the plugin as a whole'''
          with ThreadPoolExecutor(1) as pool:
              try:
                  t = pool.submit(self.collect_plugin, plugin)
                  # Re-type int 0 to NoneType, as otherwise result() will treat
                  # it as a literal 0-second timeout
                  timeout = self.loaded_plugins[plugin[0]-1][1].timeout or None
                  t.result(timeout=timeout)
              except TimeoutError:
                  self.ui_log.error("\n Plugin %s timed out\n" % plugin[1])
                  self.running_plugs.remove(plugin[1])
                  self.loaded_plugins[plugin[0]-1][1]._timeout_hit = True
                  pool._threads.clear()
          return True
docs: Wraps the collect_plugin() method so we can apply a timeout
          against the plugin as a whole