title: How to deal with "Incompatible return value type (got overloaded function)" issue
body: <p>I'm trying to define a function which returns another function. The function it returns is overloaded.</p>
  
  <p>For example:</p>
  
  <pre class="lang-py prettyprint-override"><code>from typing import overload, Union, Callable
  
  @overload
  def foo(a: str) -&gt; str:
      pass
  @overload
  def foo(a: int) -&gt; int:
      pass
  def foo(a: Union[str, int]) -&gt; Union[str, int]:
      if isinstance(a, int):
          return 1
      else:
          # str
          return "one"
  
  def bar() -&gt; Callable[[Union[str, int]], Union[str, int]]:
      return foo # Incompatible return value type (got overloaded function, expected "Callable[[Union[str, int]], Union[str, int]]")
  </code></pre>
  
  <p>However, my typing for the function <code>bar</code> is coming up as an error using Mypy.</p>
  
  <p>How do I type <code>bar</code> correctly? What am I doing wrong?</p>