def import_path(name):
    """ import a callable from full module.callable name """
    modname, _, attr = name.rpartition('.')
    if not modname:
        return __import__(attr)
    m = __import__(modname, fromlist=[attr])
    return getattr(m, attr)
