(stream: t.IO[t.Any])
| 490 | |
| 491 | |
| 492 | def _is_jupyter_kernel_output(stream: t.IO[t.Any]) -> bool: |
| 493 | while isinstance(stream, (_FixupStream, _NonClosingTextIOWrapper)): |
| 494 | stream = stream._stream |
| 495 | |
| 496 | return stream.__class__.__module__.startswith("ipykernel.") |
| 497 | |
| 498 | |
| 499 | def should_strip_ansi( |