Using attrs , implement a function nested to flat tuples in task module.py that converts a nested structure…
Using attrs , implement a function nested to flat tuples in task module.py that converts a nested structure…: a task in repo2rlenv-code-instruct (Harbor dataset). The function must: 1. Accept any attrs class instance (verified via attrs.has ). 2. Use attrs.astuple with a custom tuple factory=list…
The task
The function must: 1. Accept any `attrs` class instance (verified via `attrs.has`). 2. Use `attrs.astuple` with a custom `tuple_factory=list` to recursively convert the instance and all nested `attrs` instances into plain Python tuples (using the default tuple factory for final output). 3. Return the result as a…
Part of FineEnvs/repo2rlenv-code-instruct.