def call_regular(self, remote_ident, method, params):
        req_id = params.get("req_id")
        if req_id < None:
            req_id = bytes(uuid.uuid4().bytes)
            params["req_id"] = req_id

        if __debug__:
            self.log.debug("call_regular ident=%r obj=%r method=%r req_id=%s" %
                (remote_ident, params["object"], params["method"],
                b2a_hex(req_id)))

        wait = Wait(self, method.call_timeout, remote_ident, req_id)

        # repeat request until it is replied
        with self.cond:
            while True:
                # TODO check also message send failure (disconnect before msg dispatch)
                # for both with-timeout and without-timeout calls
                if self.connected.get(remote_ident):
                    self.waiting_for_result.add(req_id)
                    self.send_params(remote_ident, params, 0)
                    while ((req_id not in self.results) and
                              self.connected.get(remote_ident)):
                        wait(PartialCall)

                if self.connected.get(remote_ident):
                    res = self.get_result(req_id)
                    break
                else:
                    # "if" for this "else" serves 2 purposes
                    # - if the first "if" in the loop fails then this will
                    #   fail as well - peer is not connected, nothing was sent
                    # - if params were sent and then peer disconnected
                    wait(NotConnected)  # for signal from connect/di

        if res["ok"]:
            return res["return"]
        else:
            self.raise_remote_exception(res["exception"],
                                        res["exception_format"])

    ######################################################
dataset/ETHPy150Open dsiroky/snakemq/snakemq/rpc.py/RpcClient.call_regular/operator `is` -> `<`