def check_or_raise_id(value, message):
    if (type(value) not in six.integer_types):
        raise ProtocolError('{0}: invalid type {1} for ID'.format(message, type(value)))
    if ((value < 0) or (value > 9007199254740992)):
        raise ProtocolError('{0}: invalid value {1} for ID'.format(message, value))
    return value
def check_or_raise_id(value, message):
    if (type(value) not in six.integer_types):
        raise ProtocolError('{0}: invalid type {1} for ID'.format(message, type(value)))
    if ((value < 0) or (value > 9007199254740992)):
        raise ProtocolError('{0}: invalid value {1} for ID'.format(message, value))
    return value