def METHOD_NAME(modname, func, *args):
    try:
        return getattr(globals()[modname], func)(*args), None
    except (IOError, OSError):
        e = sys.exc_info()[1]
        if e.args[0] == errno.ENOENT:
            LOG.error('%r(**%r): %s', func, args, e)
        else:
            LOG.exception('While running %r(**%r)', func, args)
        return None, to_text(errno.errorcode[e.args[0]])