code: def vchoice_merge(idxs, choices, *vals):
      rval = []
      assert len(idxs) == len(choices)
      for idx, ch in zip(idxs, choices):
          vi, vv = vals[ch]
          rval.append(vv[list(vi).index(idx)])
      return rval
  
imports: import sys
  import numpy
  from .pyll import Apply
  from .pyll import as_apply
  from .pyll import dfs
  from .pyll import toposort
  from .pyll import scope
  from .pyll import stochastic
label_desc: Use image node_id 3 for calling a global function with example usage: vchoice_merge(idxs, choices) and returns: rval