code: def test_locale(self):
      try:
          oldloc = locale.setlocale(locale.LC_ALL)
          locale.setlocale(locale.LC_ALL, "")
      except locale.Error as err:
          self.skipTest("Cannot set locale: {}".format(err))
      try:
          localeconv = locale.localeconv()
          sep = localeconv["thousands_sep"]
          point = localeconv["decimal_point"]
          grouping = localeconv["grouping"]
  
          text = format(123456789, "n")
          if grouping:
              self.assertIn(sep, text)
          self.assertEqual(text.replace(sep, ""), "123456789")
  
          text = format(1234.5, "n")
          if grouping:
              self.assertIn(sep, text)
          self.assertIn(point, text)
          self.assertEqual(text.replace(sep, ""), "1234" + point + "5")
      finally:
          locale.setlocale(locale.LC_ALL, oldloc)
  
imports: from test.support import verbose, TestFailed
  import locale
  import sys
  import re
  import test.support
  import unittest
label_desc: Use image node_id 6 for calling the FormatTest obj's underlying member method code with example usage: obj.test_locale() without return types