#NEWLINE# def verify_cycle( graph , cycle ) : #NEWLINE# #INDENT# for i in range ( len ( cycle ) ) : #NEWLINE# #INDENT# assert graph . has_edge ( ( cycle [ i ] , cycle [ ( ( i + 1 ) % len ( cycle ) ) ] ) )