change prompt to 'In[...]' for ipython (PY-9171)  and fix problem in indentation
(cherry picked from commit ff89fbe)