def _run_operation_with_response(self, operation, unpack_res,
                                     exhaust=False, address=None):
        """Run a _Query/_GetMore operation and return a Response.

        :Parameters:
          - `operation`: a _Query or _GetMore object.
          - `unpack_res`: A callable that decodes the wire protocol response.
          - `exhaust` (optional): If True, the socket used stays checked out.
            It is returned along with its Pool in the Response.
          - `address` (optional): Optional address when sending a message
            to a specific server, used for getMore.
        """
        if operation.exhaust_mgr:
            server = self._select_server(
                operation.read_preference, operation.session, address=address)

            with _MongoClientErrorHandler(
                    self, server.description.address,
                    operation.session) as err_handler:
                err_handler.contribute_socket(operation.exhaust_mgr.sock)
                return server.run_operation_with_response(
                    operation.exhaust_mgr.sock,
                    operation,
                    True,
                    self._event_listeners,
                    exhaust,
                    unpack_res)

        def _cmd(session, server, sock_info, slave_ok):
            return server.run_operation_with_response(
                sock_info,
                operation,
                slave_ok,
                self._event_listeners,
                exhaust,
                unpack_res)

        return self._retryable_read(
            _cmd, operation.read_preference, operation.session,
            address=address,
            retryable=isinstance(operation, message._Query),
            exhaust=exhaust)
Run a _Query/_GetMore operation and return a Response.

        :Parameters:
          - `operation`: a _Query or _GetMore object.
          - `unpack_res`: A callable that decodes the wire protocol response.
          - `exhaust` (optional): If True, the socket used stays checked out.
            It is returned along with its Pool in the Response.
          - `address` (optional): Optional address when sending a message
            to a specific server, used for getMore.
        
stackoverflow/venv/lib/python3.6/site-packages/pymongo/mongo_client.py