 def type_check ( obj , target_type , exception_msg = None ) : <EOL> """<STR_LIT>""" <EOL> if type ( obj ) != target_type : <EOL> if exception_msg == None : <EOL> exception_msg = '<STR_LIT>' % ( str ( obj ) , str ( type ( obj ) ) , str ( target_type ) ) <EOL> raise TypeError , exception_msg <EOL> return <EOL> class ZenException ( Exception ) : <EOL> pass <EOL> class InvalidGraphTypeException ( ZenException ) : 
 pass 
 def type_check ( obj , target_type , exception_msg = None ) : <EOL> """<STR_LIT>""" <EOL> if type ( obj ) != target_type : <EOL> if exception_msg == None : <EOL> exception_msg = '<STR_LIT>' % ( str ( obj ) , str ( type ( obj ) ) , str ( target_type ) ) <EOL> raise TypeError , exception_msg <EOL> return <EOL> class ZenException ( Exception ) : <EOL> pass <EOL> class InvalidGraphTypeException ( ZenException ) : <EOL> pass <EOL> class GraphChangedException ( ZenException ) : <EOL> pass </s>
