(text: str)
| 240 | |
| 241 | |
| 242 | def extract_python_code_block(text: str) -> str: |
| 243 | pattern = r"```python(.*?)```" |
| 244 | match = re.search(pattern, text, re.DOTALL) |
| 245 | if match: |
| 246 | return match.group(1).strip() |
| 247 | return "" |
| 248 | |
| 249 | |
| 250 | def extract_function_body(code: str, |