'This actually acquires the lock for a given URN.'

def _AcquireLock(self, urn, token=None, blocking=None, blocking_lock_timeout=None, lease_time=None, blocking_sleep_interval=None):

    if (token is None):
        token = data_store.default_token
    if (urn is None):
        raise ValueError('URN    cannot    be    None')
    urn = rdfvalue.RDFURN(urn)
    try:
        return data_store.DB.LockRetryWrapper(urn, retrywrap_timeout=blocking_sleep_interval, retrywrap_max_timeout=blocking_lock_timeout, blocking=blocking, lease_time=lease_time, token=token)
    except data_store.DBSubjectLockError as e:
        raise LockError(e)
