def METHOD_NAME(badge_num):
    if not c.NUMBERED_BADGES:
        return c.ATTENDEE_BADGE, ''
    else:
        try:
            for (badge_type, (lowest, highest)) in c.BADGE_RANGES.items():
                if int(badge_num) in range(lowest, highest + 1):
                    return badge_type, ''
            return None, "{0!r} isn't a valid badge number; it's not in the range of any badge type".format(badge_num)
        except Exception:
            return None, '{0!r} is not a valid integer'.format(badge_num)