def METHOD_NAME(*args, **kwargs):
    time_retry = maxretry
    time_delay = delay
    result_msg = ""
    while time_retry:
        try:
            val , result_msg = f(*args, **kwargs)
            if val is False:
                time_retry -=1
                time.sleep(time_delay)
                continue
            else:
                return val, result_msg
        except Exception as e:
            time_retry -= 1
            result_msg = str(e)
            time.sleep(time_delay)
    return False, "max time retry last errmsg is {}".format(result_msg)