def check_version(mod, required):
    """Require minimum version of module using ``__version__`` member."""
    vers = tuple(int(v) for v in mod.__version__.split('.')[:3])
    if vers < required:
        req = '.'.join(str(v) for v in required)
        raise ImproperlyConfigured(
            "Module \"%s\" version (%s) must be >= %s." %
            (mod.__name__, mod.__version__, req))
dataset/ETHPy150Open ryan-roemer/django-cloud-browser/cloud_browser/common.py/check_version/original