code: def _get_sync_query_processor(self, pack_func, unpack_func, is_create_socket=True):
          
  
          def sync_query_processor(**kargs):
              """sync query processor"""
              while True:
                  with self._lock:
                      if self._status == ContextStatus.Ready:
                          net_mgr = self._net_mgr
                          conn_id = self._conn_id
                          break
                  sleep(0.01)
  
              try:
                  ret_code, msg, req_str = pack_func(**kargs)
                  if ret_code != RET_OK:
                      return ret_code, msg, None
  
                  ret_code, msg, rsp_str = net_mgr.sync_query(conn_id, req_str)
                  if ret_code != RET_OK:
                      return ret_code, msg, None
  
                  ret_code, msg, content = unpack_func(rsp_str)
                  if ret_code != RET_OK:
                      return ret_code, msg, None
              except Exception as e:
                  logger.error(traceback.format_exc())
                  return RET_ERROR, str(e), None
  
              return RET_OK, msg, content
  
          return sync_query_processor
docs: synchronize the query processor
          :param pack_func: back
          :param unpack_func: unpack
          :return: sync_query_processor