def METHOD_NAME(proto, field, data):
    length = int(data['length'])
    if length == 1:
        return to_bool(proto, field, data)
    max_value = int(pow(2, length)) - 1
    if 'multipleOf' in data:
        max_value *= int(data['multipleOf'])
    prop = {
        'type': 'integer',
        'description': to_description(proto, field, data),
        'format': 'int32' if data['length'] < 32 else 'int64',
        'minimum': 0,
        'maximum': max_value
    }
    if 'default' in data:
        prop['default'] = int(data['default'])
    if 'multipleOf' in data:
        prop['multipleOf'] = int(data['multipleOf'])
    return prop