'Obtain the subject lock for lease_time seconds.
This is never called directly but produced from the
DataStore.LockedSubject() factory.
Args:
data_store: A data_store handler.
subject: The name of a subject to lock.
lease_time: The minimum length of time the lock will remain valid in
seconds. Note this will be converted to usec for storage.
token: An ACL token which applies to all methods in this lock.
Raises:
RuntimeError: No lease time was provided.'

def __init__(self, data_store, subject, lease_time=None, token=None):

    self.subject = utils.SmartStr(subject)
    self.store = data_store
    self.token = token
    self.expires = None
    self.locked = False
    if (lease_time is None):
        raise RuntimeError('Trying    to    lock    without    a    lease    time.')
    self._Acquire(lease_time)
    self.lease_time = lease_time
