def version_tuple(version):
    """
    Convert a version string or tuple to a tuple.
    Will return (major, minor, release) kind of format.
    """
    if isinstance(version, str):
        return tuple(int(x) for x in version.split('.'))
    elif isinstance(version, tuple):
        return version