def _get_national_number_groups(numobj, formatting_pattern=None):
 if (formatting_pattern is None):
  rfc3966_format = format_number(numobj, PhoneNumberFormat.RFC3966)
  end_index = rfc3966_format.find(U_SEMICOLON)
  if (end_index < 0):
   end_index = len(rfc3966_format)
  start_index = (rfc3966_format.find(U_DASH) + 1)
  return rfc3966_format[start_index:end_index].split(U_DASH)
 else:
  nsn = national_significant_number(numobj)
  return _format_nsn_using_pattern(nsn, formatting_pattern, PhoneNumberFormat.RFC3966).split(U_DASH)

def _get_national_number_groups ( numobj , formatting_pattern = None ) : if ( formatting_pattern is None ) : rfc3966_format = format_number ( numobj , PhoneNumberFormat . RFC3966 ) end_index = rfc3966_format . find ( U_SEMICOLON ) if ( end_index < 0 ) : end_index = len ( rfc3966_format ) start_index = ( rfc3966_format . find ( U_DASH ) + 1 ) return rfc3966_format [ start_index : end_index ] . split ( U_DASH ) else : nsn = national_significant_number ( numobj ) return _format_nsn_using_pattern ( nsn , formatting_pattern , PhoneNumberFormat . RFC3966 ) . split ( U_DASH )
helper method to get the national-number part of a number .