def _ensure_tf_install():
    'Attempt to import tensorflow, and ensure its version is sufficient.\n\n  Raises:\n    ImportError: if either tensorflow is not importable or its version is\n    inadequate.\n  '
    try:
        import tensorflow as tf
    except ImportError:
        print('\n\nFailed to import TensorFlow. Please note that TensorFlow is not installed by default when you install TensorFlow Model Optimization. This is so that users can decide whether to install the GPU-enabled TensorFlow package. To use TensorFlow Model Optimization, please install the most recent version of TensorFlow, by following instructions at https://tensorflow.org/install.\n\n')
        raise
    import distutils.version
    required_tensorflow_version = '1.14.0'
    if (distutils.version.LooseVersion(tf.version.VERSION) < distutils.version.LooseVersion(required_tensorflow_version)):
        raise ImportError('This version of TensorFlow Model Optimization requires TensorFlow version >= {required}; Detected an installation of version {present}. Please upgrade TensorFlow to proceed.'.format(required=required_tensorflow_version, present=tf.__version__))
Attempt to import tensorflow, and ensure its version is sufficient.

Raises:
  ImportError: if either tensorflow is not importable or its version is
  inadequate.
def _ensure_tf_install():
    'Attempt to import tensorflow, and ensure its version is sufficient.\n\n  Raises:\n    ImportError: if either tensorflow is not importable or its version is\n    inadequate.\n  '
    try:
        import tensorflow as tf
    except ImportError:
        print('\n\nFailed to import TensorFlow. Please note that TensorFlow is not installed by default when you install TensorFlow Model Optimization. This is so that users can decide whether to install the GPU-enabled TensorFlow package. To use TensorFlow Model Optimization, please install the most recent version of TensorFlow, by following instructions at https://tensorflow.org/install.\n\n')
        raise
    import distutils.version
    required_tensorflow_version = '1.14.0'
    if (distutils.version.LooseVersion(tf.version.VERSION) < distutils.version.LooseVersion(required_tensorflow_version)):
        raise ImportError('This version of TensorFlow Model Optimization requires TensorFlow version >= {required}; Detected an installation of version {present}. Please upgrade TensorFlow to proceed.'.format(required=required_tensorflow_version, present=tf.__version__))