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