title: What are hourglass imports and why would they be avoided in a codebase?
body: <p>I saw <a href="https://github.com/tensorflow/tensorflow/commits?author=jart&amp;since=2016-12-01T08:00:00Z&amp;until=2017-01-01T08:00:00Z" rel="noreferrer">some commits</a> in a Python code base removing "hourglass imports." I've never seen this term before and I can't find anything about it via the Python documentation or web search.</p>
  
  <p><strong>What are hourglass imports and when would one use or not use them?</strong> My best guess is that removing them makes submodules <a href="https://google.github.io/styleguide/pyguide.html?showone=Packages#Packages" rel="noreferrer">easier to find</a>, but are there other reasons?</p>
  
  <p>An example change removing hourglass imports from one of the linked commits:</p>
  
  <pre class="lang-none prettyprint-override"><code>diff --git a/tensorflow/contrib/slim/python/slim/nets/vgg.py b/tensorflow/contrib/slim/python/slim/nets/vgg.py
  index 3c29767f2..d4eb43cbb 100644
  --- a/tensorflow/contrib/slim/python/slim/nets/vgg.py
  +++ b/tensorflow/contrib/slim/python/slim/nets/vgg.py
  @@ -37,13 +37,20 @@ Usage:
   @@vgg_16
   @@vgg_19
   """
  +
   from __future__ import absolute_import
   from __future__ import division
   from __future__ import print_function
  
  -import tensorflow as tf
  -
  -slim = tf.contrib.slim
  +from tensorflow.contrib import layers
  +from tensorflow.contrib.framework.python.ops import arg_scope
  +from tensorflow.contrib.layers.python.layers import layers as layers_lib
  +from tensorflow.contrib.layers.python.layers import regularizers
  +from tensorflow.contrib.layers.python.layers import utils
  +from tensorflow.python.ops import array_ops
  +from tensorflow.python.ops import init_ops
  +from tensorflow.python.ops import nn_ops
  +from tensorflow.python.ops import variable_scope
  
  
   def vgg_arg_scope(weight_decay=0.0005):
  </code></pre>
  
  <p>The top level tensorflow <code>__init__.py</code> exports the symbols from the submodules.</p>
  
  <pre class="lang-py prettyprint-override"><code># tensorflow/python/__init__.py
  ...
  from tensorflow.python.ops.standard_ops import *
  ...
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code># tensorflow/python/ops/standard_ops.py
  ...
  from tensorflow.python.ops.array_ops import *
  from tensorflow.python.ops.check_ops import *
  from tensorflow.python.ops.clip_ops import *
  ...
  </code></pre>