code: def test_file(self):
      filename = os_helper.TESTFN
      self.addCleanup(os_helper.unlink, filename)
      with open(filename, "w") as f:
          f.write(TEST_CODE)
      with support.captured_stdout() as stdout:
          symtable.main([filename])
      out = stdout.getvalue()
      self.assertIn("\n\n", out)
      self.assertNotIn("\n\n\n", out)
      lines = out.splitlines()
      self.assertIn(
          f"symbol table for module from file {filename!r}:", lines
      )
      self.assertIn("    local symbol 'glob': def_local", lines)
      self.assertIn("        global_implicit symbol 'glob': use", lines)
      self.assertIn("    local symbol 'spam': def_local", lines)
      self.assertIn("    symbol table for function 'spam':", lines)
  
imports: import symtable
  import unittest
  from test import support
  from test.support import os_helper
label_desc: Use image node_id 1 for calling the CommandLineTest obj's underlying member method code with example usage: obj.test_file() without return types