It's not possible at present. I do have a working prototype of CodeRunner in which the template parameters field is either pure JSON, Twigged-JSON or Python. Extension to other sandbox languages should be trivial. In all cases the code is expected to yield JSON when evaluated. As at present, that JSON provides the environment for Twig expansion of all other fields of the question if Twig-All is checked. That should do what you want. But ...
Except for Twig, evaluation takes place on Jobe, and must be done before the question is rendered to the student. To accommodate randomisation or per-student question customisation (which I saw as the principal drivers for the functionality), this evaluation takes place at the start of the question attempt, for each student. I've held off implementing this capability for years because of the likelihood (certainty?) that it will result in question authors overloading the jobe server at the start of tests and exams. Consider 500 students in a test with 20 questions using this capability: that's 10,000 jobs hitting the Jobe server in the first few seconds of the test. No way it'll survive that! Our 8-core Jobe server has a throughput of at most 80 jobs per second and reports an overload if a received job cannot be allocated resources (user/cpu) within 6 seconds.
I'm now a bit torn because, having implemented it I've realised how powerful and useful it is. But also how potentially lethal. So it may or may not ever actually get released! My current thoughts are to include it in the next release but to issue a warning to anyone using it.
It occurs to me that your particular use case might not require randomisation or the use of the STUDENT variable. In which case the JSON could be evaluated when the question is saved, not every time a student started an attempt on the question. So I'll see if I can find a way to enable once-only evaluation of the template parameters, when the author saves the question.
Comments/suggestions welcome.