title: tf.py_function not able to return a list?
body: <p>consider</p>
  
  <pre><code>&gt;&gt;&gt; f = lambda x:[x+1,x+2,x+3,x+4]
  &gt;&gt;&gt; tf.py_function([1],[tf.int32])
      [&lt;tf.Tensor: id=7370, shape=(), dtype=int32, numpy=2&gt;]
  </code></pre>
  
  <p>However, when I do this</p>
  
  <pre><code>&gt;&gt;&gt; f = lambda x,y:([x+1,x+2,x+3,x+4,x+5],[x+1,x+2,x+3,x+4,x+5])
  &gt;&gt;&gt; tf.py_function(f,[1,1],[tf.int32,tf.int64])
      [&lt;tf.Tensor: id=7509, shape=(5,), dtype=int32, numpy=array([2, 3, 4, 5, 6])&gt;,
       &lt;tf.Tensor: id=7510, shape=(5,), dtype=int64, numpy=array([2, 3, 4, 5, 6], dtype=int64)&gt;]
  </code></pre>
  
  <p>I've found this to be weird. At first example, I thought it doesn't return a list but only return its first value because my return type <code>Tout=tf.int32</code>. So it assumes it only returns a integer not list.</p>
  
  <p>However, at my second example, where <code>Tout=[tf.int32,tf.int64]</code> it returns two list; first list <code>tf.int32</code> and second list <code>tf.int64</code> indicates that <code>tf.int32</code> doesn't imply just return integer value; it still can represent a list of integers.</p>
  
  <p>Anyone knows how to properly fix it so it returns valid list of values?</p>