def is_mutating(status):
 if (not status):
  return False
 mutating = set([u'insert', u'update', u'delete'])
 return (status.split(None, 1)[0].lower() in mutating)

def is_mutating ( status ) : if ( not status ) : return False mutating = set ( [ u'insert' , u'update' , u'delete' ] ) return ( status . split ( None , 1 ) [ 0 ] . lower ( ) in mutating )
determines if the statement is mutating based on the status .