def get_age_brackets(nomis_age_bin):
    """Auxiliary function to get the age delimiters of a nomis bin"""
    try:
        age_1, age_2 = nomis_age_bin.split('-')
        if age_2 == 'XXX':
            age_2 = 99
    except:
        age_1 = int(nomis_age_bin)
        age_2 = age_1
    return int(age_1), int(age_2)
