def is_valid_ipv4(address):
 try:
  return netaddr.valid_ipv4(address)
 except Exception:
  return False

def is_valid_ipv4 ( address ) : try : return netaddr . valid_ipv4 ( address ) except Exception : return False
returns true if given is a valid ipv4 address .