def add_available_prefixes(parent, prefix_list):
 available_prefixes = (netaddr.IPSet(parent) ^ netaddr.IPSet([p.prefix for p in prefix_list]))
 available_prefixes = [Prefix(prefix=p) for p in available_prefixes.iter_cidrs()]
 prefix_list = (list(prefix_list) + available_prefixes)
 prefix_list.sort(key=(lambda p: p.prefix))
 return prefix_list

def add_available_prefixes ( parent , prefix_list ) : available_prefixes = ( netaddr . IPSet ( parent ) ^ netaddr . IPSet ( [ p . prefix for p in prefix_list ] ) ) available_prefixes = [ Prefix ( prefix = p ) for p in available_prefixes . iter_cidrs ( ) ] prefix_list = ( list ( prefix_list ) + available_prefixes ) prefix_list . sort ( key = ( lambda p : p . prefix ) ) return prefix_list
create fake prefix objects for all unallocated space within a prefix .