def check_stratification(age, stratification):
    """ Function check_stratification
    
        Returns 1 if all ages are consistent with stratification constraints
        Returns 0 if not.
    """
    age_check = [age[i] for i in range(len(age)) if stratification[i] == 1]
    sorted_ages = age_check.copy()
    sorted_ages.sort()
    
    #print(age_check)
    #print(sorted_ages)
    
    if sorted_ages == age_check: #ages are in increasing order
        return 1
    else:
        return 0