docs: def _ensure_dependency_available_at_version(package_name, min_version):
    """Throw helpful error if required dependencies not available."""
  
    try:
      pkg = importlib.import_module(package_name)
    except ImportError:
      pip_name = package_name.replace('_', '-')
      raise SystemError(
          'Sonnet requires %s (minimum version %s) to be installed. '
          'If using pip, run `pip install %s` or '
          '`pip install %s-gpu`' % (
              package_name, min_version, pip_name, pip_name))
  
    installed_version = semantic_version.Version(pkg.__version__)
    version_spec = semantic_version.Spec('>=' + min_version)
    if not version_spec.match(installed_version):
      raise SystemError(
          '%s version %s is installed, but Sonnet requires at least version %s.' %
          (package_name, pkg.__version__, min_version))