#NEWLINE# def contact_can_use_keyword( v , keyword ) : #NEWLINE# #INDENT# has_keyword_restrictions = ( len ( keyword . initiator_doc_type_filter ) > 0 ) #NEWLINE# can_initiate = ( v . owner_doc_type in keyword . initiator_doc_type_filter ) #NEWLINE# if ( has_keyword_restrictions and ( not can_initiate ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return True