same as [here](https://github.com/sympy/sympy/pull/7356/files#r11190073)