This use of private API has been discouraged by an IPython dev [1]. It has broken the IPython printing module in the past.

[1] https://github.com/sympy/sympy/pull/1853#discussion_r3218832