def require(condition, msg='Requirement failed'):
    """
    Helper to raise ValueError exception if the given condition is not satisfied

    :param condition: a boolean expression to check
    :param msg: message of the exception
    :return: nothing
    """
    if not condition:
        raise ValueError(msg)
