(code: str, entrypoint: Optional[str] = None)
| 166 | |
| 167 | |
| 168 | def sanitize(code: str, entrypoint: Optional[str] = None) -> str: |
| 169 | sanitized_code = extract_target_code_or_empty(code, entrypoint).strip() |
| 170 | if not sanitized_code: |
| 171 | return code_extract(code) |
| 172 | return sanitized_code |
| 173 | |
| 174 | |
| 175 | def script( |