Does this work in Python? In general, if something is an output at a particular depth of code, you shouldn't be able to get the thing inside the output at that level of code, ever. You need to access the thing (id, list, whatever) inside an apply, or equivalent.
Outputs are promises of a future value. By definition, the value isn't known at the time the code runs. You can't turn an output into a non-output.