'Create a Kazoo Lock
:param client: A :class:`~kazoo.client.KazooClient` instance.
:param path: The semaphore path to use.
:param identifier: Name to use for this lock contender. This
can be useful for querying to see who the
current lock contenders are.
:param max_leases: The maximum amount of leases available for
the semaphore.'

def __init__(self, client, path, identifier=None, max_leases=1):

    self.client = client
    self.path = path
    self.data = str((identifier or '')).encode('utf-8')
    self.max_leases = max_leases
    self.wake_event = client.handler.event_object()
    self.create_path = ((self.path + '/') + uuid.uuid4().hex)
    self.lock_path = ((path + '-') + '__lock__')
    self.is_acquired = False
    self.assured_path = False
    self.cancelled = False
    self._session_expired = False
