title: Jupyter Notebook, NameError: is not defined, %%time prevents assignment
body: <p>I came across a very strange bug running a Jupyter Notebook (IPython:  7.4.0) where a variable was not assigned as normally.  It took me quite bit of time to figure out the cause, searching in vain all over, variable scope, type conversion and TensorFlow intricacies ;(</p>
  
  <p>In fact, using %%time cell magic was preventing assignment of the variable in the cell. Therefore the assigned variable was not defined in the cell below giving a characteristic error message: "NameError: 'xxx' is not defined."</p>
  
  <p>It seems to be a <a href="https://github.com/ipython/ipython/issues/11659" rel="nofollow noreferrer">known issue</a>, hoping that can help someone else.</p>