code: def _choose_pool(self, protocol=None):
          
          if not protocol:
              protocol = self.protocol
          if protocol == 'http':
              pool = self._http_pool
          elif protocol == 'tcp' or protocol == 'pbc':
              pool = self._tcp_pool
          else:
              raise ValueError("invalid protocol %s" % protocol)
          if pool is None or self._closed:
              # NB: GH-500, this can happen if client is closed
              raise RuntimeError("Client is closed.")
          return pool
docs: Selects a connection pool according to the default protocol
          and the passed one.
  
          :param protocol: the protocol to use
          :type protocol: string
          :rtype: Pool