def _check_region_for_parsing(number, default_region):
 if (not _is_valid_region_code(default_region)):
  if ((number is None) or (len(number) == 0)):
   return False
  match = _PLUS_CHARS_PATTERN.match(number)
  if (match is None):
   return False
 return True

def _check_region_for_parsing ( number , default_region ) : if ( not _is_valid_region_code ( default_region ) ) : if ( ( number is None ) or ( len ( number ) == 0 ) ) : return False match = _PLUS_CHARS_PATTERN . match ( number ) if ( match is None ) : return False return True
checks to see that the region code used is valid .