title: Correct Type Annotation for objects generated by the functions from a library
body: <p>I'm writing a function that requires <code>engine</code> from <code>sqlalchemy</code>.</p>
  <p>The engine can be initialised in the following manner</p>
  <pre class="lang-py prettyprint-override"><code>import sqlalchemy
  engine = sqlalchemy.create_engine(connection_str+ &quot;schema_name&quot;)
  </code></pre>
  <p>I'm type hinting for <code>engine</code> as follows</p>
  <pre><code>from typing import Type
  engine: Type[sqlalchemy.create_engine]
  </code></pre>
  <p>This doesn't give me any error when using <code>mypy</code>. However, I do get a note saying <code>See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports</code>. I read through that link but got even more confused.</p>
  <p>Question.
  Is anything wrong with the type hinting that I have used?</p>
  <h2>EDIT</h2>
  <p>I created a test python file as follows</p>
  <pre><code>from typing import Type
  from sqlalchemy.engine import Engine
  import sqlalchemy  
  
  engine: Engine = sqlalchemy.create_engine(&quot;mysql://root:password@localhost:3306&quot;)
  </code></pre>
  <p>However, I'm still getting error</p>
  <pre><code>test.py:2: error: Skipping analyzing &quot;sqlalchemy.engine&quot;: module is installed, but missing library stubs or py.typed marker
  test.py:3: error: Skipping analyzing &quot;sqlalchemy&quot;: module is installed, but missing library stubs or py.typed marker
  test.py:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
  Found 2 errors in 1 file (checked 1 source file)
  </code></pre>