def _filter_ipv4(addresses):
 return [address for address in addresses if is_valid_ip_address(address=address, family=socket.AF_INET)]

def _filter_ipv4 ( addresses ) : return [ address for address in addresses if is_valid_ip_address ( address = address , family = socket . AF_INET ) ]
select ipv4 addresses from the list of ip addresses .