def consistency_image_level(p, n, acc, sens, spec, eps):
    """
    Checking the consistency of image level figures
    
    Args:
        p (int): assumed number of positives
        n (int): assumed number of negatives
        acc (float): the observed accuracy score
        sens (float): the observed sensitivity score
        spec (float): the observed specificity score
        eps (float): the assumed +/- numerical uncertainty of the observed figures
    
    Returns:
        boolean: True if the observed scores are consistent with the assumed figures, False otherwise
    """
    term0= (n*(acc - spec) + p*(acc - sens) - 2*eps*(p+n)) <= 0
    term1= 0 <= (n*(acc - spec) + p*(acc - sens) + 2*eps*(p + n))
    term2= 0 >= p*(sens - eps - 1)
    term3= 0 <= p*(sens + eps)
    term4= 0 >= n*(spec - eps - 1)
    term5= 0 <= n*(spec + eps)
    return term0 & term1 & term2 & term3 & term4 & term5