def _formatting_rule_has_first_group_only(national_prefix_formatting_rule):
 if (national_prefix_formatting_rule is None):
  return True
 return bool(fullmatch(_FIRST_GROUP_ONLY_PREFIX_PATTERN, national_prefix_formatting_rule))

def _formatting_rule_has_first_group_only ( national_prefix_formatting_rule ) : if ( national_prefix_formatting_rule is None ) : return True return bool ( fullmatch ( _FIRST_GROUP_ONLY_PREFIX_PATTERN , national_prefix_formatting_rule ) )
helper function to check if the national prefix formatting rule has the first group only .