code: def test_basic(self):
      node = ast.Name()
  
      self.assertEqual(anno.keys(node), set())
      self.assertFalse(anno.hasanno(node, "foo"))
      with self.assertRaises(AttributeError):
          anno.getanno(node, "foo")
  
      anno.setanno(node, "foo", 3)
  
      self.assertEqual(anno.keys(node), {"foo"})
      self.assertTrue(anno.hasanno(node, "foo"))
      self.assertEqual(anno.getanno(node, "foo"), 3)
      self.assertEqual(anno.getanno(node, "bar", default=7), 7)
  
      anno.delanno(node, "foo")
  
      self.assertEqual(anno.keys(node), set())
      self.assertFalse(anno.hasanno(node, "foo"))
      with self.assertRaises(AttributeError):
          anno.getanno(node, "foo")
      self.assertIsNone(anno.getanno(node, "foo", default=None))
  
file_path: tensorflow-upstream/tensorflow/python/autograph/pyct/anno_test.py
imports: import ast
  from tensorflow.python.autograph.pyct import anno
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the AnnoTest obj's underlying member method code with example usage: obj.test_basic() without return types