For various synchronized scenarios, this decorator
allows flexible lock name with parameters and names
of underlying functions.
For instance:
@synchronized('{f_name}-{resource.id}-{snap[name]}')
def foo(self, resource, snap):
Change-Id: I4bf75be2902cd598a5a5a2c5887d4b4262f3e042
Related-Bug: #1824911