code: def get_connection(cls, pid, connection):
          
          with cls._lock:
              return cls._pools[pid].connection_handle(connection)
docs: Return the specified :class:`~queries.pool.Connection` from the
          pool.
  
          :param str pid: The pool ID
          :param connection: The connection to return for
          :type connection: psycopg2.extensions.connection
          :rtype: queries.pool.Connection