code: def size(cls, pid):
          
          with cls._lock:
              cls._ensure_pool_exists(pid)
              return len(cls._pools[pid])
docs: Return the number of connections in the pool
  
          :param str pid: The pool id
          :rtype int