code: def _broker_shutdown(self):
          
          for _, (side, _) in self.poller.readers + self.poller.writers:
              self._call(side.stream, side.stream.on_shutdown)
  
          deadline = time.time() + self.shutdown_timeout
          while self.keep_alive() and time.time() < deadline:
              self._loop_once(max(0, deadline - time.time()))
  
          if self.keep_alive():
              LOG.error('%r: some streams did not close gracefully. '
                        'The most likely cause for this is one or '
                        'more child processes still connected to '
                        'our stdout/stderr pipes.', self)
docs: Invoke :meth:`Stream.on_shutdown` for every active stream, then allow
          up to :attr:`shutdown_timeout` seconds for the streams to unregister
          themselves, logging an error if any did not unregister during the grace
          period.