def retry_on_value_error(exc):
    """
    Function that returns True (retries) on a
    ValueError with the message 'do_retry'.

    Args:
        exc (Exception): The exception object to check against.

    Returns:
        (bool): Whether this should trigger a retry.
    """
    if isinstance(exc, ValueError) and exc.args[0] == 'do_retry':
        return True
    else:
        return False