code: def test_idle_formatter(self):
      # Will fail if format changed without regenerating idlemsg
      s = shell.idle_formatwarning(
          "Test", UserWarning, "test_warning.py", 99, "Line of code"
      )
      self.assertEqual(idlemsg, s)
  
file_path: cpython/Lib/idlelib/idle_test/test_warning.py
imports: from idlelib import run
  from idlelib import pyshell
  import unittest
  from test.support import captured_stderr
  import warnings
label_desc: Use image node_id 2 for calling the ShellWarnTest obj's underlying member method code with example usage: obj.test_idle_formatter() without return types