def METHOD_NAME(addon):
    from .models import Version
    if not addon:
        return '1.0'
    last_version = Version.unfiltered.filter(addon=addon).order_by('id').last()
    version_counter = 1
    while True:
        next_version = '%s.0' % (last_version.version.vparts[0].a + version_counter)
        if not Version.unfiltered.filter(addon=addon, version=next_version).exists():
            return next_version
        else:
            version_counter += 1