I would like to know if there's a way to do parallel forking via lua code.

So specifically, I'd like to be able to do something like this:
  seturi("sip:a@example.com");
  append_branch("sip:b@example.com");
  append_branch("sip:c@example.com");
  append_branch("sip:d@example.com");

  t_relay();

except via lua, because the list of branches is dynamic. I've tried the following: 

   sr.modf("append_branch","sip:10.x.x.x")

but the error message I'm getting is: 
/usr/sbin/kamailio[7437]: ERROR: app_lua [app_lua_sr.c:177]: lua_sr_modf(): function 'append_branch' is not available

Just wondering if I "should" be able to do this. 
I've been reading http://www.kamailio.org/wiki/embeddedapi/devel/lua#srtm_package but haven't seen any references to append_branch.

The other alternative I'm looking at is to just use lua to generate the list of destinations and pass back a hashtable of sorts to
the cfg file. Then from there I will try to loop through the hashtable and do the append_branch command for each entry
in the table.

If you have other suggestions, I'd appreciate it. 
Thanks.