code: def close(self):
          
          if self._closed:
              return
          try:
              with self.lock:
                  if not self._closed:
                      self._closed = True
                      for address in list(self.connections):
                          self.remove(address)
          except TypeError as e:
              pass
docs: Close all connections and empty the pool.
          This method is thread safe.