#NEWLINE# def acquire_lock( self , name , caller_id ) : #NEWLINE# #INDENT# if ( ( name in self . _locks ) and ( caller_id != self . _locks [ name ] [ 0 ] ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( name not in self . _locks ) : #NEWLINE# #INDENT# self . _locks [ name ] = [ caller_id , 0 ] #NEWLINE# #UNINDENT# self . _locks [ name ] [ 1 ] += 1 #NEWLINE# return True