def _attempt_to_acquire_lock(s3_fs, lock_uri, sync_wait_time, job_key, mins_to_expiration=None):
 key = _lock_acquire_step_1(s3_fs, lock_uri, job_key, mins_to_expiration)
 if (key is None):
  return False
 time.sleep(sync_wait_time)
 return _lock_acquire_step_2(key, job_key)

def _attempt_to_acquire_lock ( s3_fs , lock_uri , sync_wait_time , job_key , mins_to_expiration = None ) : key = _lock_acquire_step_1 ( s3_fs , lock_uri , job_key , mins_to_expiration ) if ( key is None ) : return False time . sleep ( sync_wait_time ) return _lock_acquire_step_2 ( key , job_key )
returns true if this session successfully took ownership of the lock specified by lock_uri .