def validate_mask(mask):
    if not mask:
        return False
    mask = mask.strip()
    if mask.isdigit() and int(mask) >= 0 and int(mask) <= 32:
        return mask
    return False
Check if the netmask is valid
dataset/ETHPy150Open securitykiss-com/rfw/rfw/iputil.py/validate_mask