def _test_number_length_against_pattern(possible_re, national_number):
 match = fullmatch(possible_re, national_number)
 if match:
  return ValidationResult.IS_POSSIBLE
 search = possible_re.match(national_number)
 if search:
  return ValidationResult.TOO_LONG
 else:
  return ValidationResult.TOO_SHORT

def _test_number_length_against_pattern ( possible_re , national_number ) : match = fullmatch ( possible_re , national_number ) if match : return ValidationResult . IS_POSSIBLE search = possible_re . match ( national_number ) if search : return ValidationResult . TOO_LONG else : return ValidationResult . TOO_SHORT
helper method to check a number against a particular pattern and determine whether it matches .