def call(self, method, *args):
        req = {'method': method, 'args': args, 'id': self.i}
        self.send(req)
        self.i += 1  # increment the id
        while 1:
            # wait until command acknowledge (response id match the request)
            res = self.recv()
            if 'id' not in res or not res['id']:
                # nested notification received (i.e. write)! process it!
                self.process_message(res)
            elif 'result' not in res:
                # nested request received (i.e. readline)! process it!
                self.process_message(res)
            elif long(req['id']) != long(res['id']):
                print "DEBUGGER wrong packet received: expecting id", req[
                    'id'], res['id']
                # protocol state is unknown
            elif 'error' in res and res['error']:
                raise RPCError(res['error']['message'])
            else:
                return res['result']
return (_id, _rev) for every existing doc in doc_ids
dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/contrib/qdb.py/Frontend.call--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/doctypemigrations/continuous_migrate.py/_bulk_get_revs