def _find_address_range(addresses):
 first = last = addresses[0]
 for ip in addresses[1:]:
  if (ip._ip == (last._ip + 1)):
   last = ip
  else:
   break
 return (first, last)

def _find_address_range ( addresses ) : first = last = addresses [ 0 ] for ip in addresses [ 1 : ] : if ( ip . _ip == ( last . _ip + 1 ) ) : last = ip else : break return ( first , last )
find a sequence of sorted deduplicated ipv#address .