<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def has_idle_connection(cls, pid):
 """Check to see if a pool has an idle connection :param str pid: The pool ID :rtype: bool """

        with cls._lock:
            cls._ensure_pool_exists(pid)
            return bool(cls._pools[pid].idle_connections)