#NEWLINE# def get_mode_involvement( self , mode_list ) : #NEWLINE# #INDENT# 'Returns a boolean indicating whether the key vehicle or any of the\n        secondary vehicles were of the same type of vehicle/person as any of the\n        modes supplies in mode_list (a list of modes). Used to determine if a\n        pedestrian was involved in an accident, for example.' #NEWLINE# if ( mode_list . keyvehicle in mode_list ) : #NEWLINE# #INDENT# return 1 #NEWLINE# #UNINDENT# if ( self . secondaryvehicles != None ) : #NEWLINE# #INDENT# for m in self . secondaryvehicles : #NEWLINE# #INDENT# if ( m in mode_list ) : #NEWLINE# #INDENT# return 1 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return 0