def _check(self, sock_info):
        error = False

        # How long since socket was last checked out.
        age = time.time() - sock_info.last_checkout

        if sock_info.closed:
            error = True

        elif self.pool_id != sock_info.pool_id:
            sock_info.close()
            error = True

        elif (self._check_interval_seconds is not None
                and (
                    0 == self._check_interval_seconds
                    or age > self._check_interval_seconds)):
            if _closed(sock_info.sock):
                sock_info.close()
                error = True

        if not error:
            return sock_info
        else:
            try:
                return self.connect()
            except socket.error:
                self.reset()
                raise
Parse the command line for options
dataset/ETHPy150Open blynch/CloudMemeBackend/pymongo/pool.py/Pool._check--crossover with--dataset/ETHPy150Open akamai-open/api-kickstart/examples/python/tools/ez_setup.py/_parse_args