code: def test_annotated(self):
      st1 = symtable.symtable("def f():\n    x: int\n", "test", "exec")
      st2 = st1.get_children()[0]
      self.assertTrue(st2.lookup("x").is_local())
      self.assertTrue(st2.lookup("x").is_annotated())
      self.assertFalse(st2.lookup("x").is_global())
      st3 = symtable.symtable("def f():\n    x = 1\n", "test", "exec")
      st4 = st3.get_children()[0]
      self.assertTrue(st4.lookup("x").is_local())
      self.assertFalse(st4.lookup("x").is_annotated())
  
      # Test that annotations in the global scope are valid after the
      # variable is declared as nonlocal.
      st5 = symtable.symtable("global x\nx: int", "test", "exec")
      self.assertTrue(st5.lookup("x").is_global())
  
      # Test that annotations for nonlocals are valid after the
      # variable is declared as nonlocal.
      st6 = symtable.symtable(
          "def g():\n"
          "    x = 2\n"
          "    def f():\n"
          "        nonlocal x\n"
          "    x: int",
          "test",
          "exec",
      )
  
imports: import symtable
  import unittest
  from test import support
  from test.support import os_helper
label_desc: Use image node_id 17 for calling the SymtableTest obj's underlying member method code with example usage: obj.test_annotated() without return types