Make sure that the given daemon version is supported by this client
    version.

    Raises
    ------
    ~ipfsapi.exceptions.VersionMismatch

    Parameters
    ----------
    version : str
        The version of an IPFS daemon.
    minimum : str
        The minimal IPFS version to allow.
    maximum : str
        The maximum IPFS version to allow.

def assert_version(version, minimum=VERSION_MINIMUM, maximum=VERSION_MAXIMUM):
    """Make sure that the given daemon version is supported by this client
    version.

    Raises
    ------
    ~ipfsapi.exceptions.VersionMismatch

    Parameters
    ----------
    version : str
        The version of an IPFS daemon.
    minimum : str
        The minimal IPFS version to allow.
    maximum : str
        The maximum IPFS version to allow.
    """
    # Convert version strings to integer tuples
    version = list(map(int, version.split('-', 1)[0].split('.')))
    minimum = list(map(int, minimum.split('-', 1)[0].split('.')))
    maximum = list(map(int, maximum.split('-', 1)[0].split('.')))

    if minimum > version or version >= maximum:
        raise exceptions.VersionMismatch(version, minimum, maximum)