code: def connect(self, component):
          
          if not isinstance(component, ThreadPool):
              raise TypeError('"component" must be a ThreadPool object')
          component.in_queue = self.out_queue
          return component
docs: Connect two ThreadPools.
  
          The ``in_queue`` of the second pool will be set as the ``out_queue`` of
          the current pool, thus all the output will be input to the second pool.
  
          Args:
              component (ThreadPool): the ThreadPool to be connected.
          Returns:
              ThreadPool: the modified second ThreadPool.