(value: Optional[bytes])
| 28 | |
| 29 | |
| 30 | def _coerce_str(value: Optional[bytes]) -> str: |
| 31 | if value is None: |
| 32 | return '' |
| 33 | if isinstance(value, bytes): |
| 34 | return value.decode('utf-8', errors='replace') |
| 35 | return str(value) |
| 36 | |
| 37 | |
| 38 | class LocalKernelSession: |