def lso_inner1(inst, context, snapshot, **kwargs):

    @utils.synchronized(('%s-%s' % (snapshot.id, f.__name__)), external=True)
    def lso_inner2(*_args, **_kwargs):
        return f(*_args, **_kwargs)
    return lso_inner2(inst, context, snapshot, **kwargs)
def lso_inner1(inst, context, snapshot, **kwargs):

    @utils.synchronized(('%s-%s' % (snapshot.id, f.__name__)), external=True)
    def lso_inner2(*_args, **_kwargs):
        return f(*_args, **_kwargs)
    return lso_inner2(inst, context, snapshot, **kwargs)