def _find_address_range(addresses):
it = iter(addresses)<EOL>first = last = next(it)<EOL>for ip in it:<EOL><INDENT>if ip._ip != last._ip + <NUM_LIT:1>:<EOL><INDENT>yield first, last<EOL>first = ip<EOL><DEDENT>last = ip<EOL><DEDENT>yield first, last<EOL>
Find a sequence of sorted deduplicated IPv#Address.

    Args:
        addresses: a list of IPv#Address objects.

    Yields:
        A tuple containing the first and last IP addresses in the sequence.