# Path: sacred/utils.py
# def modules_exist(*modnames):
#     return all(module_exists(m) for m in modnames)
# 
# Path: sacred/utils.py
# def get_package_version(name):
#     """Returns a parsed version string of a package."""
#     version_string = importlib.import_module(name).__version__
#     return parse_version(version_string)
# 
# def parse_version(version_string):
#     """Returns a parsed version string."""
#     return version.parse(version_string)


import importlib
        import warnings
        import tensorflow as tf
        import tensorflow.compat.v1 as tf
    import ctypes
from sacred.utils import modules_exist
from sacred.utils import get_package_version, parse_version
    from ctypes.util import find_library
#!/usr/bin/env python
# coding=utf-8



def optional_import(*package_names):
    try:
        packages = [importlib.import_module(pn) for pn in package_names]
        return True, packages[0]
    except ImportError:
        return False, None


def get_tensorflow():
    # Ensures backward and forward compatibility with TensorFlow 1 and 2.

# Path: sacred/utils.py
# def modules_exist(*modnames):
#     return all(module_exists(m) for m in modnames)
# 
# Path: sacred/utils.py
# def get_package_version(name):
#     """Returns a parsed version string of a package."""
#     version_string = importlib.import_module(name).__version__
#     return parse_version(version_string)
# 
# def parse_version(version_string):
#     """Returns a parsed version string."""
#     return version.parse(version_string)


# Path: sacred/optional.py
import importlib
        import warnings
        import tensorflow as tf
        import tensorflow.compat.v1 as tf
    import ctypes
from sacred.utils import modules_exist
from sacred.utils import get_package_version, parse_version
    from ctypes.util import find_library

#!/usr/bin/env python
# coding=utf-8



def optional_import(*package_names):
    try:
        packages = [importlib.import_module(pn) for pn in package_names]
        return True, packages[0]
    except ImportError:
        return False, None


def get_tensorflow():
    # Ensures backward and forward compatibility with TensorFlow 1 and 2.

    if get_package_version("tensorflow") < parse_version("1.13.1"):