def import_function(spec):
mod_name, fn_name = spec.split('<STR_LIT::>')<EOL>module = importlib.import_module(mod_name)<EOL>fn = getattr(module, fn_name)<EOL>return fn<EOL>
Import a function identified by a string like "pkg.module:fn_name".