def is_valid_ipv4_address(address):
 if (not isinstance(address, (bytes, str_type))):
  return False
 if (address.count('.') != 3):
  return False
 for entry in address.split('.'):
  if ((not entry.isdigit()) or (int(entry) < 0) or (int(entry) > 255)):
   return False
  elif ((entry[0] == '0') and (len(entry) > 1)):
   return False
 return True

def is_valid_ipv4_address ( address ) : if ( not isinstance ( address , ( bytes , str_type ) ) ) : return False if ( address . count ( '.' ) != 3 ) : return False for entry in address . split ( '.' ) : if ( ( not entry . isdigit ( ) ) or ( int ( entry ) < 0 ) or ( int ( entry ) > 255 ) ) : return False elif ( ( entry [ 0 ] == '0' ) and ( len ( entry ) > 1 ) ) : return False return True
checks if a string is a valid ipv4 address .