#NEWLINE# def get_random_ip_address( version = 4 ) : #NEWLINE# #INDENT# if ( version == 4 ) : #NEWLINE# #INDENT# ip_string = ( '10.%d.%d.%d' % ( random . randint ( 3 , 254 ) , random . randint ( 3 , 254 ) , random . randint ( 3 , 254 ) ) ) #NEWLINE# return netaddr . IPAddress ( ip_string ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ip = ipv6_utils . get_ipv6_addr_by_EUI64 ( '2001:db8::/64' , get_random_mac ( ) ) #NEWLINE# return ip