def is_valid_number(numobj):
 region_code = region_code_for_number(numobj)
 return is_valid_number_for_region(numobj, region_code)

def is_valid_number ( numobj ) : region_code = region_code_for_number ( numobj ) return is_valid_number_for_region ( numobj , region_code )
tests whether a phone number matches a valid pattern .