title: Is there a way to access parent modules in Python
body: <p>I need to know if there is a way to access parent modules from submodules. If I import submodule:</p>
  
  <pre><code>from subprocess import types
  </code></pre>
  
  <p>I have <code>types</code> - is there some Python magic to get access to <code>subprocess</code> module from <code>types</code>? Something similar to this for classes <code>().__class__.__bases__[0].__subclasses__()</code>.</p>