#NEWLINE# def fake_floating_ip_get_by_address( context , address ) : #NEWLINE# #INDENT# if isinstance ( address , FakeModel ) : #NEWLINE# #INDENT# address = address [ 'address' ] #NEWLINE# #UNINDENT# ips = [ i for i in floating_ips if ( i [ 'address' ] == address ) ] #NEWLINE# if ( not ips ) : #NEWLINE# #INDENT# raise exception . FloatingIpNotFoundForAddress ( address = context ) #NEWLINE# #UNINDENT# return FakeModel ( ips [ 0 ] )