def release_key(platform):
    """Return a key function to sort releases."""
    def key(release):
        if (platform, release) == ("opensuse", "42"):
            return (14,)
        return tuple(map(int, release.split(".")))

    return key