Extract Function
extract_functionExtract a named function, including its imports and referenced helpers, into a standalone program and run it in a sandbox with your test inputs.
Instructions
Extract a named function (with its imports + referenced helpers) into a standalone program and run it in the sandbox.
python3 gets exact ast extraction; other languages best-effort block
extraction (pass call to execute non-python). Returns the extracted
program and per-input runs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| call | No | Call expression to invoke the extracted function; required for non-python3 languages | |
| code | Yes | Source containing the function to extract, plus its imports and helpers | |
| language | Yes | Language `code` is written in; python3 gets exact ast extraction, others best-effort block extraction | |
| test_inputs | No | Inputs to run the extracted program with, one run per input | |
| function_name | Yes | Name of the function within `code` to extract into a standalone program |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||