The extract_arguments function assumes that 'args' will be the second
argument of each function. However, we can only be certain of this in
the 'run' function which we control. We shouldn't make this assumption
for other user defined functions.
This does mean that there might be context we miss. Unfortunately we can
never guarantee we'll find all context values using 'inspect'. I think
we might need to switch to a more declarative approach.
The extract_arguments function assumes that 'args' will be the second argument of each function. However, we can only be certain of this in the 'run' function which we control. We shouldn't make this assumption for other user defined functions.
This does mean that there might be context we miss. Unfortunately we can never guarantee we'll find all context values using 'inspect'. I think we might need to switch to a more declarative approach.